mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2497] Firecfg multi-user behavior - error shown by default when only one user ran sudo firecfg #1628
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#1628
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 @Hocuri on GitHub (Mar 1, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2497
Run sudo firecfg with one user x
Switch to another user y
Run a git command, for example:
touch a b ; git diff --no-index a bResult:
Error: the user is not allowed to use Firejail. Please add the user in /etc/firejail/firejail.users file, either by running "sudo firecfg", or by editing the file directly. See "man firejail-users" for more details.User y is not supposed to use Firejail (he doesn't need it) so I do not think that any error should be shown.
@Fred-Barclay commented on GitHub (Mar 2, 2019):
Hi @Hocuri
While I can see your point, I personally would disagree. In the interests of being transparent and also to avoid confusing lots of users who would otherwise have firejail refuse to run without warning, I think we should always advise when a user is not allowed to run
firejailcommand. This would especially be problematic if the only reason the user couldn't run firejail was because of a typo or accidental misconfiguration on their part -- as it is now, it's hopefully easy for them to see what the error is and how to fix it. If we removed the warning, it'd be much harder for them to figure out what to do.Sudo does something very similar too, for instance:
username is not in the sudoers file. This incident will be reported.for chaps who don't have superuser permissions.@Hocuri commented on GitHub (Mar 2, 2019):
Totally agree but I'm afraid that I expressed myself too vaguely - Imo Firejail shouldn't be launched at all if it wasn't configured for this account (i.e firejail shouldn't be executed). I guessed that it had something to do with me executing sudo firecfg from another account but I am not sure.
BTW do you have any idea what is trying to use Firejail? I mean, I just used git, why would I need Firejail?
@rusty-snake commented on GitHub (Mar 2, 2019):
sudo firecfgis not per user, it ensures that some programs are executed by default in FJ, system-widels /usr/local/binorls -l /usr/local/bin --color=always | grep "firejail" --color=neverall symlinks in/usr/local/binpointing to firejail are executed by default in FJ.@Hocuri commented on GitHub (Mar 4, 2019):
Thanks!
I found it out, it's
less.My suggestion for
sudo firecfg:Would you like to enable Firejail system-wide? (y/n)If not, put the links to ~/.local/bin/ instead
If yes:
Would you like to allow all desktop users to run Firejail? You can change this later. (y/n)To change who can use Firejail run sudo nano /etc/configfilewhereever(desktop user means uid >= 1000)
@smitsohu commented on GitHub (Mar 6, 2019):
It is an interesting idea, but this implies that there is a directory in user home with a high precedence in $PATH .... many distributions don't do this, and I think it is actually a best practice to not do this.
@Hocuri commented on GitHub (Mar 6, 2019):
The two distros I used up to now (Mint and Manjaro) do.
But I also think that Firecfg should check somehow whether ~/.local/bin/ really is in PATH. I do not know how do this if run by sudo though. So maybe we should just tell users to run Firecfg without sudo if they do not want to enable it for all users.
So:
sudo firecfg:Firejail will be enabled system-wide. If you do not want this, press Ctrl+C now and run firecfg without sudo.Would you like to allow all desktop users to run Firejail? You can change this later. (y/n)To change who can use Firejail run sudo nano /etc/configfilewhereeverfirecfgis able to inspect PATH then.@netblue30 commented on GitHub (Mar 11, 2019):
You can specify the directory where you want the symlinks using --bindir= command line option . Example (as regular user):
@Hocuri commented on GitHub (Mar 11, 2019):
Ah ok. I think that this should be the default behavior of
firejailwithout sudo then, if .local/bin is in PATH.Or, a more "complete" solution: https://github.com/netblue30/firejail/issues/2497#issuecomment-470209533
@rusty-snake commented on GitHub (Sep 10, 2019):
@netblue current this is labled with "information", is @Hocuri's idea a won't fix or should be add "enhancement"?