mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3426] Feature request: Allow bind in non-root mode #2152
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#2152
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 @howryu on GitHub (May 21, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3426
It seems that currently firejail only allows --bind under root user. Is this design for security concern? Is it possible to add support for non root user case? Probably need some sanitize in source/target directory e.g. source directory must be owned by current user, target directory should place under home directory.
@rusty-snake commented on GitHub (May 21, 2020):
Yes, consider
--bind=~/evil.sudoers,/etc/sudoersI think it is.
Closing as duplicated of #459 (that's realy old 🥴)
@howryu commented on GitHub (May 21, 2020):
@rusty-snake So is there plan to support binding in non-root case? Or how difficult it is to support that? Is sanitizing source/target directory's privilege good enough?
My use case is that I had a subdirectory under
/opt, e.g./opt/foo/bar(bar is owned by non-root user who will start the firejail). I want to accessbardirectory inside jail without exposing directory tree of/opt(so--private-optis not an option here). I am also looking at--private=option (to mount/opt/foo/barto the home directory), however I have multiple nested directory need to be accessed. so--private=is not viable either. :( Closet solution I can think of is mount bind multiple directory to the home directory in the jail.@ghost commented on GitHub (May 21, 2020):
There are no 'hidden' (non-public) plans in the firejail project. As long as there aren't any PR's specifically implementing this feature, it's safe to assume no plans to do so.
Hard to answer. At the very minimum a fair amount of C programming skills/experience and insight to the Linux kernel security infrastructure I'd say.
About your use case. If you can
mount --bind /opt/foo/bar /home/howryu/barprior to starting firejail, it would be easy to control access to that location from inside the sandbox by way of all the regular firejail options (including private-opt none). Is there anything special to your use case that warrants the need for a bind mount inside the sandbox?@howryu commented on GitHub (May 21, 2020):
@glitsj16 It seems that
mountrequires root privilege? I don't want to switch to root to do the mount.@rusty-snake commented on GitHub (May 22, 2020):
You could also do this at start by a systemd.service or fstab (https://serverfault.com/questions/613179/how-do-i-do-mount-bind-in-etc-fstab/613184#613184).