mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3878] umask always 0002 #2437
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2437
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SkewedZeppelin on GitHub (Jan 9, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3878
umask is always set to 0002 in the sandbox.
I don't remember this in the past.
Noticed it appear a few months ago.
umask shouldn't be less restrictive then what the distro/user defaults to.
eg. umask shouldn't become 0002 if the distro sets 0022 or the user sets 0077.
Environment
7c3dd381a6@smitsohu commented on GitHub (Jan 9, 2021):
Try the following outside Firejail
It's the default Fedora configuration (
/etc/bashrcvia~/.bashrc).@smitsohu commented on GitHub (Jan 9, 2021):
If it is considered useful we could probably have an option to set the umask per sandbox. All the machinery is in place already, it is just that Firejail does not expose it to the user.
@SkewedZeppelin commented on GitHub (Jan 9, 2021):
@smitsohu
Yep, you are correct.
I should've checked that.
Why isn't the existing umask persisted into the sandbox?
@smitsohu commented on GitHub (Jan 10, 2021):
When Firejail is done with configuring the sandbox, and there was no
--shell=nonerequest, the last thing it does is either running$SHELL, or, if an application was specified,$SHELL -c application.If no application was specified, what we get is an interactive shell. Assuming
$SHELLis bash, it reads ~/.bashrc and executes the instructions. All descendent processes, basically the entire sandbox, then inherit the default0002umask.If, however, an application was specified, the shell is not interactive, ~/.bashrc is ignored and the umask is passed through as expected:
@SkewedZeppelin commented on GitHub (Jan 10, 2021):
Yep, I see it now.
Thank you @smitsohu for the clarification.