mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4026] --private and $HOME #2507
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#2507
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 @reinerh on GitHub (Mar 2, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4026
A Debian user reported the oddity that a
bindirectory inside a--privatehome directory is read-only.This is caused by
read-only ${HOME}/binfromdisable-common.inc.Is it actually intended that
${HOME}applies to the private home directory as well?@rusty-snake commented on GitHub (Mar 2, 2021):
If not we can close #903.
That's one workflow, another can be
--private=~/workor--private=~/kleingartenverein. Then ${HOME} should expand to the --private home. Let's say you run ssh and firefox in ~/work, then you don't want that firefox can read the ssh keys of your company.So I think it's better to expand ${HOME} to --private and use noblacklist/nowhitelist/read-write/ignore.
@vinc17fr commented on GitHub (Mar 2, 2021):
Well, if firefox cannot read the ssh configuration, then ssh won't be able to read it either (both being run in the jail)! So what's the point of storing ssh configuration in
~/work?@rusty-snake commented on GitHub (Mar 2, 2021):
The workflow would look like
firejail --private=~/work firefoxandfirejail --private=~/work ssh. Both will use their own profile (with may hasnoblacklist ${HOME}/.ssh).Using different homes for work, personal stuff, association activity, ... (https://firejail.wordpress.com/documentation-2/firefox-guide/#work).
@reinerh commented on GitHub (Mar 2, 2021):
@vinc17fr Would it work for you to create overrides in
disable-common.local(or your own profile if you are using one)?Some users might already be relying on the fact that
$HOMEalso applies to private home directories, so it's difficult to loosen this now.@vinc17fr commented on GitHub (Mar 2, 2021):
If firefox and ssh have their own profile, I suppose that it is this profile that should blacklist/restrict the various files and directories, just like if
--privatewere not used. Having to use things likenoblacklist ${HOME}/.sshfor ssh would just be ugly and error prone.What do you mean by overrides? Note that just unblacklisting
binwould not be sufficient in general. There should be no restriction on files inside the private directory.@reinerh commented on GitHub (Mar 2, 2021):
Disallowing acces to e.g.
${HOME}/.sshmakes sense globally. It is too much maintenance effort to blacklist common sensitive paths in every single profile.This is currently the case for the
ssh.profile. Exactly this "pattern" allows blacklisting .ssh globally by default. Having to remember to put it into every profile is more error prone.I mean adding
ignore read-only ${HOME}/bintodisable-common.local(or the profile of your application you use with a private home). This will prevent having read-only bin directory.I think your use case is different than others. If you really want no restriction at all, you could also use
--noprofileto not load any profile (firejail --noprofile --private=fj-test).@vinc17fr commented on GitHub (Mar 2, 2021):
But the
ssh.profileis fine. I'm talking about the default profile.This is not OK. I still want the usual blacklists, e.g.
/etc/ssh.@reinerh commented on GitHub (Mar 2, 2021):
Can you please explain why modifying your application's profile (or .local override file) is not an option for you?
Unfortunately no profile works for 100% of users, and .local files are there to allow customizations for some corner cases.
@rusty-snake commented on GitHub (Mar 2, 2021):
@vinc17fr commented on GitHub (Mar 2, 2021):
How can one ignore all the
read-only?Something like
ignore read-only ${HOME}/*does not work.@rusty-snake commented on GitHub (Mar 2, 2021):
ignoreis a stupid command that does not know any semantic of it's value (i.e. it can't glob).ignore read-onlyworks.@vinc17fr commented on GitHub (Mar 2, 2021):
So I think that what I'm seeking for is some simple script that does
@reinerh commented on GitHub (Mar 2, 2021):
Maybe
ignorecan be extended to support globs? Or match every line that contains a specified prefix?@vinc17fr commented on GitHub (Mar 2, 2021):
Or perhaps a
noread-onlyoption, just like one hasnoblacklist?A
HAS_PRIVATEconditional would be useful, e.g. to havein
default.local(or in some other profile).@rusty-snake commented on GitHub (Mar 3, 2021):
We have
read-write. Unlike(no)blacklistit works with subpaths too.However, you still need
ignore read-only ...if the ro comes abter the rw.@rusty-snake commented on GitHub (Aug 4, 2021):
I'm closing here due to inactivity, please fell free to request to reopen if you have more questions.