mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1979] [SOLVED] firejail runs sandbox for app that I didn't set to run in firejail #1331
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#1331
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 @omega3 on GitHub (Jun 5, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1979
Is it a bug or a feature?
Kubuntu 14.04
I was suprised to discover that firejail runs applications in sandbox that I didn't set it to run, like kate and keepass2. I wasn't able to run keepass2 until I deleted profile in /etc/firejail/
But deleting profiles to run app is not the best practice. What should be done instead?
user2 is my second user account not belonging to sudo group.
Keepass should be not only restricted to access outside locations but should be protected to be accessed by keyloggers from outside because of lack of GUI isolation. Is that correct? Can firejail help for this problem?
@chiraag-nataraj commented on GitHub (Jun 5, 2018):
Did you use
firecfgto set up symlinks in/usr/local/bin? What is the output ofwhich keepass2?@omega3 commented on GitHub (Jun 5, 2018):
No. Before updating to the new firejail version I didn't use firejail for keepass2.
Can you tell me how to do it? Is it described somewhere?
I also have to point out that I use keepass2 on my second user accout but I did
Then I added all my users to /etc/firejail/firejail.users
So it looks like:
I also have problems with accessing local profiles that I reported here:
https://github.com/netblue30/firejail/issues/1975
@chiraag-nataraj commented on GitHub (Jun 5, 2018):
Okay, so can you do a
ls -lh /usr/local/bin/keepass2? I suspect it's linked to/usr/bin/firejail. You can runsudo firecfg --cleanto remove the symlinks created (I think at some point, it was run - maybe not by you, but by the package installer or something?). Regardless, runningsudo firecfg --cleanshould fix the issue.@chiraag-nataraj commented on GitHub (Jun 5, 2018):
Okay, so note that
sudo firecfgwill enable it globally, not per user (since the links are set up in/usr/local/bin, which takes priority over/usr/binby default in your$PATH). If you don't want this, you should either create per-user links (e.g. in~/bin) or just run it manually withfirejail. Or, you could modify the$PATHto not look first in/usr/local/bin, but that may end up breaking other things.@chiraag-nataraj commented on GitHub (Jun 5, 2018):
@netblue30, should we add a non-sudo mode for
firecfgwhere the symbolic links are created per-user?@omega3 commented on GitHub (Jun 5, 2018):
That would be good, I think because I don't use keepass2 on my first (sudo) account. The second user for whom I use keepass2 doesn't belong to sudo group. I want to use local profiles for this account.
Can you write just step by step what I should do, bacause I am not that fluent in all this technical issues.
@chiraag-nataraj commented on GitHub (Jun 5, 2018):
Okay. To prevent
keepass2from running throughfirejail, dosudo rm /usr/local/bin/keepass2. This will preventkeepass2from being started throughfirejail, which should fix your issue. Note that this means that if you do want to runkeepass2throughfirejail, you will have to explicitly run it asfirejail keepass2.As I said above, if you want to prevent
firejailfrom running everything it can automatically (keepass2,kate, etc), runsudo firecfg --clean.@omega3 commented on GitHub (Jun 5, 2018):
Ok. What about this:
Keepass should be not only restricted to access outside locations but should be protected to be accessed by keyloggers from outside because of lack of GUI isolation. Is that correct? Can firejail help for this problem? Can firejail protect programs run in firejail to be accessed from outside?
@chiraag-nataraj commented on GitHub (Jun 5, 2018):
Sort of. You have graphical isolation through
xpra, but that only helps when all of your apps are sandboxed in this way. That is, if you have a sandboxed app (e.g.keepass2) and a non-sandboxed app (say, your window manager or desktop environment), your window manager (and anything you launch from there, such as a terminal) will be able to access thekeepass2window. However, if you also launchfirefoxwithxpra(in a different instance), it won't be able to see thekeepass2window.Here's a concrete example that may help.
:0.xprawith a virtual screen of:100and startkeepass2within that. So now,keepass2cannot see any windows besides its own (and any other programs you launch within:100).xprawith a virtual screen of:200and startfirefoxwithin that. So now,firefoxandkeepass2cannot see each other (since they are on different [virtual] screens).:0, it can see bothfirefoxandkeepass2. The only way to prevent this is to launch literally every program in its own virtual screen.(I used
xprain my example here, butxephyralso works)@chiraag-nataraj commented on GitHub (Jun 7, 2018):
@omega3 Did I answer your question? Any more questions?
@omega3 commented on GitHub (Jun 7, 2018):
Yes. Thank you.