this is the command:

pc@linux-vhvu:~> sshfs -o nonempty -o sshfs_debug root@XXXXXXXXXXXXX: ./dg
SSHFS version 2.3
Server version: 3
Extension: posix-rename@openssh.com <1>
Extension: statvfs@openssh.com <2>
Extension: fstatvfs@openssh.com <2>
Extension: hardlink@openssh.com <1>

Flow of events:

Formerly I tried the same thing with a different folder called "remote". It errored out, and said

fusermount: failed to access mountpoint /home/pc/remote: Permission denied

Then I tried with a new folder, because for some reason the permissions of ./remote changed to root...but the same thing happened to ./dg!

drwx------ 1 root root 4096 Oct 29 06:19 ./dg

  • Take a look at the sshd's log on the remote host.
    – quanta
    Dec 6 '11 at 14:40
  • Good question. I wondered why, having user@host:/ /mnt/host/root fuse.sshfs noauto,users,reconnect,IdentityFile=/home/user/.ssh/id_rsa 0 0 in /etc/fstab, user can mount, but only root can unmount (umount) directory because of umount: root: Permission denied. But now i know, that's because sshfs changes the owner of root to root. Sep 28 '14 at 22:33

When you mount a filesystem to a directory, the mountpoint assumes the permissions of the mounted filesystem's top directory. So, check to be sure that the permissions are proper on the target filesystem on the far end as well.


I ran into the same issue. The solution that worked for me was setting the uid and gid as follows:

sshfs -o uid=1000 -o gid=997 developer@dev.server2.example.net:/usr/share/nginx/ dev.server2

That will set the mount point and everything inside to 1000:997 which are the actual IDs in the remote server. Locally my id is also 1000 so I'm still the owner. Hope it helps.



Probably because you are logging in as root?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.