mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6889] firejail(1) man page does not say what is the current working directory inside the jail #3406
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#3406
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 @vinc17fr on GitHub (Sep 3, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6889
Description
The
firejail(1)man page does not say what is the current working directory inside the jail. It seems to be that same directory unless it is no longer accessible under its old pathname, in which case the current working directory is changed to the (potentially new) home directory.Steps to Reproduce
As root:
(same behavior without
--noprofile), but if I startfirejailfrom/root(the old home directory for root), I get:This behavior seems to be because
optis whitelisted by default (thus/optis still valid as the current working directory), but the/rootdirectory (pathname to be interpreted outside the jail) is no longer accessible.Environment
uname -srm): Linux 6.16.3+deb14-amd64 x86_64firejail --version): 0.9.76@vinc17fr commented on GitHub (Sep 3, 2025):
Well, in addition to the documentation issue, I think that the behavior is incorrect. In addition to the above:
This is unexpected because in the real file hierarchy,
/root/subdirand/opt/dir1/subdirare unrelated directories.@vinc17fr commented on GitHub (Sep 3, 2025):
And similarly, from one's home directory:
is also unexpected. If one was in a directory that corresponds to the new home or one of its subdirectories, I think that the pathname of the current working directory should be adapted so that one remains in the same directory (if still accessible).