mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1650] Whitelist/Backlist with subfolders (mount points - ZFS) #1112
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#1112
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 @nicovs on GitHub (Nov 16, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1650
In my server setup I have a ZFS filesystem folder structure where each users has his own ZFS filesystem
What I would like to achieve is that when a user logs in, he/she can see only his/her own homefolder (and mount point)
eg, when i ssh into the server as user user2, when the user does an ls on /zfspool/userhomes, he only see's /zfspool/userhomes/user2, but not the other folders.
What I've got this far, with blacklisting is that the users can see all home folders from other users, just not the content, like this:
So, how can I achieve only seeing:
My login.users:
My profile /etc/firejail/shared_ssh_jail.profile:
@smitsohu commented on GitHub (Nov 16, 2017):
If I understand it correctly, would it help to
--whitelist=/zfspool/userhomes/$USER? This will not work in the profile, only on the commandline.Edit: Sorry, this is only possible if zfspool is in a whitelistable path, i.e. /home, /dev, /media, /mnt, /opt, /srv, /var or /tmp
@nicovs commented on GitHub (Nov 16, 2017):
Hi @smitsohu, i might be able to change my zfspool to /srv eg.
no option to add /data as a whitelistable path? :) (my actual location os /data, not /zfspool. this was as an example.
@nicovs commented on GitHub (Nov 17, 2017):
To give more feedback @smitsohu:
Changed my /etc/passwd from:
myusername:1001:1001::/data/userhomes/myusername:bin/bashto:
myusername:1001:1001::/srv/myusername/:/usr/bin/firejail/srv/myusername/, if not, you'll get the error:login.users:
the profile:
Together with my good old friend autofs :)
/etc/auto.master:
/etc/autofs.sshjail
Yes, this is some funky workaround: I cannot just change the zfs mountpoints. Too much hardcoded stuff inside the folders
@smitsohu commented on GitHub (Nov 17, 2017):
Cool! But it works :) I guess this can be closed then?
@nicovs commented on GitHub (Nov 17, 2017):
just checking some more stuff.... seems it's not 100% yet 🗡
@nicovs commented on GitHub (Nov 17, 2017):
Ok, all checked out and working. Changed the login.users in my comment above. Seems you cannot user
--whitelist=${HOME}or--whitelist=~/but you need to use the full path.Can be closed
@smitsohu commented on GitHub (Nov 17, 2017):
Closed. Thanks for sharing.