-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot start firejailed app from a path on a gocryptfs filesystem #3798
Comments
I cannot reproduce this with firejail from master and gocryptfs 1.8.0 on Fedora 33.
Can you trying using plain bash (if you aren't)?
|
I was using zsh, but I just tried the same thing in bash and the behavior remains the same. |
So... it looks to me as if firejail is doing something that uses the current working directory, while it attempts to load |
firejail will fail on fuse mounts w/o |
Hm... haven't tested this yet. I saw something about this previously, but I obviously assumed that it would apply only if any of the data relevant to firejail was actually stored on that mount. In my case, it's only the current working directory that is on the mount, but there is no reason for firejail to look at this working directory. And in fact it all works fine - if I use |
For instance, this works perfectly fine for me. I'm accessing a file that is on the mount, but the current working directory is not on the mount.
|
Somehow read the firejail/src/firejail/profile.c Lines 1642 to 1652 in 81bba6c
The issues seems to be that EDIT: Reason for failing on EPERM: #3478 (comment) and all following. |
To confirm, when I mount gocryptfs with |
I don't entirely agree with this comment:
I think it would be better if we don't exit if a |
I want to keep failing on EPERM, since it indicates invalid/wrong configurations. However, |
I agree with that - I thought this behavior was "on purpose". I think it could be potentially dangerous to check cwd for an |
A program in a blacklisting sandbox could create it's own .local in cwd (usually ~) and add |
All agreed. I wasn't thinking in such detail - just that I could be enticed somehow to download a file called |
FWIW / for search engines' benefit, the same problem occurs running firejail while sitting in an encfs filesystem, probably the same reason (pwd is a fuse filesystem not mounted with allow_*, etc.). |
Also for completion and for the next one having the same problem and searching for it immediately being suggested this issue ticket: |
Yes, this is my issue with opening files from Thunar - I can drag and drop them to open in VLC or an editor, however I can't whitelist the gvfs mount location because it is no longer in my home directory. My only workaround so far has been to symlink directly in /usr/local/bin eog, vlc, geany, and others so I don't run into this. |
This is super annoying. My NAS is pretty much unusable with a default firejail installation. I thought I could work around this by removing Does anyone have a suggestion how to efficiently make this work? |
AFAIK you can
to workaround. |
That was a nice idea. However, evince still fails to open the file. When opening a PDF using the GUI, evince shows the correct file path ( In both cases the file open fails with "file or directory not found". I suppose this is a privilege issue, too? Running from another cwd as in "start evince in another directory than open the file which is still located on the share" fails with the same error message. Copying the file to another directory would of course work, but is not very efficient. Ultimately, I think that firejail should support gvfs shares out of the box if technically possible. This leaves "fix firejail" as only viable option, which I am unfortunately unable to do. However, I hope that my analysis can at least help others with the same issue. |
First you need to distinct different issues here:
|
I understood this issue to be more about the To sum it up, I tried adding I don't understand how my situation differs from the apparently working example described in #3798 (comment), which is why I thought that there must be some other problem. It seems however that it ultimately all comes down to Thanks for your help anyway, I will try to evaluate some alternatives. I still consider mounting SMB shares via gvfs something that many Linux users might do, so it would be great to come up with a way to make this work with firejail. Edit:
The next time you login, the autostart script should fire and remount the gvfs fuse file system with the crucial |
I would agree with not searching cwd (creates concerns similar to having If firejail only looked in |
I agree with not searching $ cat foo.profile
include bar.profile
$ firejail -I. --profile=foo.profile --include=bar.profile ./foo This would include ./foo.profile, ./bar.profile and then run |
This problem may be related to #3199, but it's different.
Firejail has trouble accessing a (non-existent!)
xxx.local
profile file when I run it from a folder that is mounted using gocryptfs.This works:
But this does not work -
/home/sturm/cryptmount
is an encrypted folder.Note that
qpdfview.local
does not exist anywhere. Also,qpdfview
is a random choice - any other tool that has a profile in/etc/firejail
and includes axxx.local
file shows the same behavior. For reference,/etc/firejail/qpdfview.profile
(unchanged by me) includes this line near the top:Bug and expected behavior - What did you expect to happen?
I expect to be able to run firejail from any path (including gocryptfs mounts) and see consistent outcome (and preferably no errors).
Environment
The text was updated successfully, but these errors were encountered: