mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5336] firejail --private fails if the root user home directory is not /root #2960
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#2960
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 @birdie-github on GitHub (Aug 23, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5336
Using firejail-0.9.66-3.fc36.x86_64.
According to
/etc/passwdmy root user home directory is elsewhere, precisely in/home/root.firejail --privatefails in this case:The location of the root directory must be read programmatically instead of being assumed to be
/root, e.g. usinghttps://stackoverflow.com/a/26696759
@birdie-github commented on GitHub (Aug 24, 2022):
0.9.70 is affected as well. The root home directory must not be hard coded.
@rusty-snake commented on GitHub (Aug 28, 2022):
FWIW: Firejail assumes a lot paths to be at the standard location and shows unexpected results if a system differs much from FHS and XDG standards. In some case this can not be avoided.
Anyway labeling as bug.
@birdie-github commented on GitHub (Aug 28, 2022):
/rootis not defined in the FHS or POSIX standards: https://unix.stackexchange.com/questions/714726/is-root-a-hard-requirement-for-a-modern-linux-system-what-about-posix-unix@rusty-snake commented on GitHub (Aug 28, 2022):
It is defined in the FHS. Read the answer on your link/question. You are correct that it isn't a hard requirement but it is the suggested/standard path of it. And that's what I said, firejail assumes standard/suggested paths in a lot places.
@birdie-github commented on GitHub (Feb 13, 2023):
I guess no one will fix this issue, are there any firejail alternatives?
@rusty-snake commented on GitHub (Feb 13, 2023):
Depends on your usage and required features. Maybe https://github.com/igo95862/bubblejail.
@ghost commented on GitHub (Feb 13, 2023):
Have you run in any other trouble, besides firejail --private issues, with such a setup? Can you re-assign root's home to /root or isn't that an option? I realize this is probably not a very useful response, but did your OS configure root like this? What OS are we talking about here?
@birdie-github commented on GitHub (Feb 13, 2023):
I could have posted a patch to find out the real root home directory but I feel like the main developer(s) behind the project totally oppose this idea, so ok, never mind.
As for the location of my root home directory: my
/filesystem is non-essential and I don't care about it, that's why I moved /root to a different location (/home/root). I did it by choice and everything works just fine.I'm closing this feature request/bug report and uninstalling the application. Sorry for the noise.
@rusty-snake commented on GitHub (Feb 13, 2023):
Still a bug, reopening.
@rusty-snake commented on GitHub (Feb 13, 2023):
The problem seems to be more that
/rootdoes not exists rather than$HOMEfor uid0 isn't/root.a67bb37b0d/src/firejail/fs_home.c (L366-L409)