How do I make a volume mounted using sudo sshfs visible without sudo?

342 views
Skip to first unread message

Daryl Spitzer

unread,
Aug 23, 2017, 2:29:41 PM8/23/17
to OSXFUSE
My question is detailed in https://apple.stackexchange.com/questions/296028/how-do-i-make-a-volume-mounted-using-sudo-sshfs-visible-without-sudo.

For your convenience:

After upgrading my Mac to macOS Siera (10.12.5), I upgraded FUSE for macOS (https://osxfuse.github.io) to the latest stable releases: FUSE for macOS 3.6.3 and SSHFS 2.5.0.

But now this no longer works:

$ sudo mkdir -p /Volumes/ssh_fs_5810 && sshfs dspitzer@dspitzer-5810:/home/CORP/dspitzer /Volumes/ssh_fs_5810/
mount_osxfuse: failed to mount /Volumes/ssh_fs_5810@/dev/osxfuse0: Operation not permitted

/Volumes/ssh_fs_5810 exists:

$ ls /Volumes
Macintosh HD ssh_fs_5810

Apparently sshfs now requires sudo:

$ sudo sshfs dspitzer@dspitzer-5810:/home/CORP/dspitzer /Volumes/ssh_fs_5810/
dspitzer@dspitzer-5810's password:

But now /Volumes/ssh_fs_5810/ is not visible without sudo:

$ ls /Volumes
ls: ssh_fs_5810: No such file or directory
Macintosh HD
$ sudo ls /Volumes
Macintosh HD    ssh_fs_5810
$ sudo ls /Volumes/ssh_fs_5810
.ICEauthority           .ssh
...

How do I make /Volumes/ssh_fs_5810/ (the directory I mount into using sudo sshfs) visible without sudo?

Update (addressing SteppingHat's comment):

Yes, the owner of /Volumes/ssh_fs_5810/ is root:

$ sudo ls -l /Volumes
Password:
total 16
lrwxr-xr-x  1 root      wheel     1 Aug 22 16:09 Macintosh HD -> /
drwxr-xr-x@ 1 root      wheel  4096 Aug 22 16:06 ssh_fs_5810

But this doesn't work:

$ sudo chown dspitzer:admin /Volumes/ssh_fs_5810/
chown: /Volumes/ssh_fs_5810/: Operation not permitted

And note above, /Volumes/ssh_fs_5810/ is visible after I create it using sudo, but not after sudo sshfs:

$ sudo umount -f /Volumes/ssh_fs_5810
$ sudo ls -l /Volumes
total 8
lrwxr-xr-x  1 root      wheel    1 Aug 22 16:09 Macintosh HD -> /
$ sudo mkdir /Volumes/ssh_fs_5810/
$ sudo ls -l /Volumes
total 8
lrwxr-xr-x  1 root      wheel    1 Aug 22 16:09 Macintosh HD -> /
drwxr-xr-x+ 2 root      wheel   68 Aug 22 18:05 ssh_fs_5810
$ ls /Volumes
Macintosh HD sh_fs_5810

hayim....@gmail.com

unread,
Oct 10, 2017, 7:15:11 AM10/10/17
to OSXFUSE
Did 'allow_other' option not work for that?
Reply all
Reply to author
Forward
0 new messages