[GH-ISSUE #305] make mkdir recursive #213

Closed
opened 2026-05-05 05:19:59 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @vn971 on GitHub (Feb 19, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/305

This is a question-like issue currently, but I think a change is needed to avoid confusion:

Why isn't mkdir invoked by default when doing whitelist?
The possible pitfall I see with the current approach is that people might get confused:

  • somebody takes his system, tests his new-created profile. Since directories exist on his computer, everything goes fine
  • he submits the profile so it would be available for everyone
  • people start to complain because this will not work on their fresh computers.

Thoughts?

Originally created by @vn971 on GitHub (Feb 19, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/305 This is a question-like issue currently, but I think a change is needed to avoid confusion: Why isn't `mkdir` invoked by default when doing `whitelist`? The possible pitfall I see with the current approach is that people might get confused: - somebody takes his system, tests his new-created profile. Since directories exist on his computer, everything goes fine - he submits the profile so it would be available for everyone - people start to complain because this will not work on their fresh computers. Thoughts?
gitea-mirror 2026-05-05 05:19:59 -06:00
Author
Owner

@manevich commented on GitHub (Feb 20, 2016):

Doing mkdir for everything whitelisted is wrong idea, there are many cases when whitlisted file/directory is used when available but not created by app.
Since new mkdir option implemented (see 97a9d01868 and 3a71eb2af9 commits) this is just about insufficient testing of profile.
You can use --private option in conjunction with your fresh profile to rule out such things, as in most cases it's about $HOME/.something directories.

<!-- gh-comment-id:186595959 --> @manevich commented on GitHub (Feb 20, 2016): Doing mkdir for everything whitelisted is wrong idea, there are many cases when whitlisted file/directory is used when available but not created by app. Since new `mkdir` option implemented (see https://github.com/netblue30/firejail/commit/97a9d0186863f6afe1a003e7e390b1b369167531 and https://github.com/netblue30/firejail/commit/3a71eb2af9a2153c9d40d0e2f31093d8e7c87b01 commits) this is just about insufficient testing of profile. You can use `--private` option in conjunction with your fresh profile to rule out such things, as in most cases it's about `$HOME/.something` directories.
Author
Owner

@netblue30 commented on GitHub (Feb 20, 2016):

We build only the directories strictly necessary for the application. For example, for Firefox we have ~/.mozilla and ~/.cache/mozilla/firefox. All other directories are only necessary to run some extensions, and we will let the user build them. We also have an "include /etc/firejail/whitelist-common.inc". This file deals with system configuration such as fonts, gtk etc.

<!-- gh-comment-id:186631226 --> @netblue30 commented on GitHub (Feb 20, 2016): We build only the directories strictly necessary for the application. For example, for Firefox we have ~/.mozilla and ~/.cache/mozilla/firefox. All other directories are only necessary to run some extensions, and we will let the user build them. We also have an "include /etc/firejail/whitelist-common.inc". This file deals with system configuration such as fonts, gtk etc.
Author
Owner

@vn971 commented on GitHub (Feb 28, 2016):

OK to close. One small question if you don't mind though:
how do you think, would it make sense to make mkdir recursive?

<!-- gh-comment-id:189881295 --> @vn971 commented on GitHub (Feb 28, 2016): OK to close. One small question if you don't mind though: how do you think, would it make sense to make `mkdir` recursive?
Author
Owner

@netblue30 commented on GitHub (Feb 28, 2016):

Yes, I'll look into it.

<!-- gh-comment-id:189881606 --> @netblue30 commented on GitHub (Feb 28, 2016): Yes, I'll look into it.
Author
Owner

@vn971 commented on GitHub (Feb 28, 2016):

Thanks!

<!-- gh-comment-id:189881805 --> @vn971 commented on GitHub (Feb 28, 2016): Thanks!
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#213
No description provided.