mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5816] ssh: sftp fails in nautilus with GNOME gvfs 1.53+ (ControlMaster, ControlPath) #3100
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#3100
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 @Saren-Arterius on GitHub (May 4, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5816
Description
Since GNOME gvfs 1.53+, the SSH client option
ControlMaster=autoandControlPath=/run/user/$UID/gvfsd-sftp/%Cis used to mount SFTP.Since firejail did not whitelist
/run/user/$UID/gvfsd-sftpby default, gvfs SFTP mount with nautilus will fail with a meaningless error message shown in UI, and gvfs binary spawned withGVFS_DEBUG=1will output the following log:Steps to Reproduce
Steps to reproduce the behavior
ssh -o"ForwardX11 no" -o"ForwardAgent no" -o"PermitLocalCommand no" -o"ClearAllForwardings yes" -o"NoHostAuthenticationForLocalhost yes" -o"ControlMaster auto" -o"ControlPath=/run/user/${UID}/gvfsd-sftp/test" -s {SSH_HOST} sftpunix_listener: cannot bind to path /run/user/$UID/gvfsd-sftp/test.{RANDOM_STRING}: No such file or directory, and SSH exits with error code 255Expected behavior
GVFS/SSHFS connects successfully
Actual behavior
GVFS/SSHFS fail to connect because of firejail has not whitelisted the ControlPath specified by GVFS.
Workaround/Solution
Create
/etc/firejail/ssh.localwith the following content@kmk3 commented on GitHub (May 4, 2023):
@Saren-Arterius on May 4:
Nicely done.
Could you open a PR to add it to ssh.profile?
@ghost commented on GitHub (May 4, 2023):
Why not add it to
sftp.profileinstead?@kmk3 commented on GitHub (May 4, 2023):
Yes, that's probably better.
@mirko commented on GitHub (Sep 14, 2024):
Tried adding it to
.config/firejail/sftp.local-> doesn't work. Adding to.config/firejail/ssh.localdoes, though.