Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

this is the command:

pc@linux-vhvu:~> sshfs -o nonempty -o sshfs_debug root@XXXXXXXXXXXXX: ./dg
SSHFS version 2.3
Server version: 3
Extension: <1>
Extension: <2>
Extension: <2>
Extension: <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

share|improve this question
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. – Vytenis Bivainis Sep 28 '14 at 22:33
up vote 3 down vote accepted

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.

share|improve this answer

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 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.

share|improve this answer


Probably because you are logging in as root?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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