mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2867] Can't seem to stop .Xauthority or .asound from being created/copied #1789
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#1789
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 @slackhead on GitHub (Jul 22, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2867
firejail 0.9.60
I would like to run shell scripts that don't require network, X11 or sound
firejail --x11=none --net=none --nosound --private=./ sh
@rusty-snake commented on GitHub (Jul 22, 2019):
--private=./for what?firejail --x11=none --net=none --nosound ls -l .Xauthorityshould show your--------and owner:nobody=>firejail --x11=none --net=none --nosound cat .Xauthorityends inPermission deniedwhitelist.EDIT:
To deny access to
.asoundyou need--blacklist=${HOME}/.asound.@slackhead commented on GitHub (Jul 22, 2019):
Hi
1 I need to block any writing to filesystem except for the current directory and /tmp. --chroot seems to want the cwd to be owned by root.
2 The current directory is a build directory whch will be synced with a git repo after each shell script has been tested, so I don't want any extra files created.
I have tried to whitelist them but it makes no difference:
whitelist ${HOME}/.asoundrc
whitelist ${HOME}/.Xauthority
in both default.profile and whitelist-common.inc.
Thanks
EDIT
It seems --chroot wants a real chroot with /proc etc. anyway.
@rusty-snake commented on GitHub (Jul 22, 2019):
Well, now I get you setup and intend.
whitelisting the files you want, not the files you don't want. Anyway.--private=.will only protect${HOME}.You can use
--read-only=PATHto mount PATHro.@rusty-snake commented on GitHub (Jul 22, 2019):
@slackhead can you try
firejail --x11=none --net=none --nosound --whitelist=${HOME}/GIT_REPO bash SCRIPT@slackhead commented on GitHub (Jul 22, 2019):
Thanks, that helps a lot. I have a couple of different ideas. This one blacklists /tmp too:
I also will need to run some scripts as root and be able to use ccache. I think something like this should work if I set the ccache directory to a named overlay in /root/.firejail/sbo/odiff/root/.ccache
Hopefully that leaves only /tmp writeable, and I should be able to find /root/.firejail to see if anything tried write anywhere else.
@smitsohu commented on GitHub (Jul 26, 2019):
IMHO it would be "more right" to indeed not copy these files if there is a
nosoundorx11 noneoption.@smitsohu commented on GitHub (Aug 7, 2019):
Should be fixed.