mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1560] Cannot open files from sshfs #1037
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#1037
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 @graywolf on GitHub (Sep 17, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1560
I cannot open files from sshfs when using vlc in firejail. For some reason it seems that it ignores path and just tries to open filename in home?
When I call it with
/usr/bin/vlc(therefore bypassing firejail) it works as expected.@SkewedZeppelin commented on GitHub (Sep 17, 2017):
This seems related to #1419
@graywolf commented on GitHub (Sep 17, 2017):
I found #1419 but it seems to me that in that one sshfs is approach that is working as opposed to
gvfs-*providers (whatever that is). It even ends with suggestion to trysmbnetfswhich uses FUSE (same assshfs).@smitsohu commented on GitHub (Sep 20, 2017):
Hi @graywolf! Is this possibly related to your mount options? With something basic like
reconnect,allow_other,nodev,nosuid,noexecit is working for me.@graywolf commented on GitHub (Sep 20, 2017):
Hm, so the reason was that I didn't have
allow_otherin mount options. Well,allow_rootis enough. Now question is why do I need it? While firejail is suid binary, doesn't it change back to the original user and launch the program under the normal (non-root) user? So why do I needallow_root? I still think this is a bug...@smitsohu commented on GitHub (Sep 20, 2017):
Something must go wrong when the sandbox is set up, which is done by Firejail as root. Noteworthy from the fuse manpage:
that means unless allow_root or allow_other is specified.
@smitsohu commented on GitHub (Sep 20, 2017):
For me, operations like whitelisting, noexec, read-write make such sshfs paths unavailable inside the jail.
I see you have a custom profile, are you doing something like this?
EDIT:
@netblue30 commented on GitHub (Sep 20, 2017):
I got the same thing, but adding a"allow_other" to sshfs fixed the problem (thanks @smitsoh). Even whitelists and blacklists are working. This is how I mount it:
@graywolf commented on GitHub (Sep 20, 2017):
@smitsohu While I have custom profile, it's extremely simple:
@netblue30 yep,
allow_otherfixes the issue for me too (as doesallow_rootwhich I used), but I'm more curious why it's needed when the vlc runs under regular user (uid == 1000) and not root...@netblue30 commented on GitHub (Sep 21, 2017):
It seems to be a problem with with the way fuse interacts with the mount namespace. You can run a fuse filesystem as regular user but mount namespace requires it to be root. By the time vlc is started, the filesystem is already broken.
@graywolf commented on GitHub (Sep 22, 2017):
So nothing to do from firejail's side? Than this can probably be closed, after all workaround is reasonably simple (
allow_root).@hyiltiz commented on GitHub (Oct 23, 2020):
Still cannot connect to it even if
/usr/bin/sshfsis directly called without going thru firejail.@wonbug commented on GitHub (Aug 16, 2022):
I'm also having this issue. sshfs with
allow_rootorallow_otherjust hangs indefinitely attempting to mount the remote directory. Is there anything else to try from firejail's end?@SkewedZeppelin commented on GitHub (Aug 16, 2022):
I use SSHFS everyday for my NAS on all my systems. I have zero issues with accessing folders from firejail'ed programs.
Running fuse-sshfs-3.7.3-1.fc36 and firejail from master as of a few days ago.
Here is what i use in fstab:
Also helps to read the errors you get! 😉
@wonbug commented on GitHub (Feb 24, 2023):
@SkewedZeppelin thanks for sharing that fstab line - it works well for me now on Debian 11.6!
@kmille commented on GitHub (Jul 2, 2023):
For me
sudo sshfs -o allow_otherworks. Running it without sudo does not work (user_allow_other is specified in /etc/fuse.conf). It just hangs ...: