[GH-ISSUE #225] [rfe] add option to blacklist all ~/.* directories #158

Closed
opened 2026-05-05 05:11:54 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @genodeftest on GitHub (Jan 13, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/225

In many cases you need to blacklist all but a few "dot" directories in ${HOME}. This is because applications should usually not have access to config files of most other applications. Is there any simple way to do this? If not implementing such a feature would be nice.

A general option for that would be nice, since blacklisting is always risky since whoever wrote the config might have missed something.

With this option one could get rid of most blacklist config options, including most of etc/disable-common.inc and etc/disable-secret.inc.

Originally created by @genodeftest on GitHub (Jan 13, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/225 In many cases you need to blacklist all but a few "dot" directories in ${HOME}. This is because applications should usually not have access to config files of most other applications. Is there any simple way to do this? If not implementing such a feature would be nice. A general option for that would be nice, since blacklisting is always risky since whoever wrote the config might have missed something. With this option one could get rid of most `blacklist` config options, including most of etc/disable-common.inc and etc/disable-secret.inc.
gitea-mirror 2026-05-05 05:11:54 -06:00
Author
Owner

@the8472 commented on GitHub (Jan 13, 2016):

What about using whitelist instead of blacklist?

<!-- gh-comment-id:171412439 --> @the8472 commented on GitHub (Jan 13, 2016): What about using whitelist instead of blacklist?
Author
Owner

@genodeftest commented on GitHub (Jan 13, 2016):

"Blacklist all but a few" essentially is whitelisting. I meant ~/.* directories should generally be forbidden, but they can still be whitelisted.

<!-- gh-comment-id:171453171 --> @genodeftest commented on GitHub (Jan 13, 2016): "Blacklist all but a few" essentially is whitelisting. I meant `~/.*` directories should generally be forbidden, but they can still be whitelisted.
Author
Owner

@the8472 commented on GitHub (Jan 13, 2016):

Yes, but I mean if you use the whitelist feature then everything else in the home dir is automatically blacklisted, which obviously includes the dot dirs.

<!-- gh-comment-id:171455664 --> @the8472 commented on GitHub (Jan 13, 2016): Yes, but I mean if you use the whitelist feature then everything else in the home dir is automatically blacklisted, which obviously includes the dot dirs.
Author
Owner

@genodeftest commented on GitHub (Jan 13, 2016):

I just want to blacklist the ~/.* directories. That's why I opened this issue.

An example: Your PDF viewer might need access to some config files in ~/.local and ~/.config, but it doesn't need access to any other ~/.* folder. It needs access to things like Desktop and Downloads directory, so those should probably be allowed. Since users sometimes have other directories below ${HOME} with relevant non-config/non-cache data in it, I won't blacklist everything but those two directories.

I haven't figured out how to whitelist all directories in ${HOME} not starting with a .. That's what I need.

(Sorry for being complicated, English is not my first language.)

<!-- gh-comment-id:171470694 --> @genodeftest commented on GitHub (Jan 13, 2016): I just want to blacklist the `~/.*` directories. That's why I opened this issue. An example: Your PDF viewer might need access to some config files in ~/.local and ~/.config, but it doesn't need access to any other `~/.*` folder. It needs access to things like Desktop and Downloads directory, so those should probably be allowed. Since users sometimes have other directories below `${HOME}` with relevant non-config/non-cache data in it, I won't blacklist everything but those two directories. I haven't figured out how to whitelist all directories in ${HOME} not starting with a `.`. That's what I need. (Sorry for being complicated, English is not my first language.)
Author
Owner

@netblue30 commented on GitHub (Jan 14, 2016):

OK, I'll add a --blacklist-alldotfiles option!

<!-- gh-comment-id:171648186 --> @netblue30 commented on GitHub (Jan 14, 2016): OK, I'll add a --blacklist-alldotfiles option!
Author
Owner

@netblue30 commented on GitHub (Mar 6, 2016):

It is working today:

$ firejail --blacklist=.*

All dot files under home are blacklisted.

<!-- gh-comment-id:192946585 --> @netblue30 commented on GitHub (Mar 6, 2016): It is working today: ``` $ firejail --blacklist=.* ``` All dot files under home are blacklisted.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#158
No description provided.