Denied root access to user mounted FUSE file system

Let me start with giving you the details of my setup:

I am running Fedora 13 on an x86_64 arch. I have mounted a remote directory using sshfs:

jim@localsite $ sshfs jim@remotesite:/home/jim /home/jim/remotemount

Now if su to root and try to read the content under the mount point, I get:

root@localsite $ ls -l /home/jim/remotemount
ls: cannot access remotemount: Permission denied
root@localsite $ ls -l /home/jim
total 0
drwxrwx---. 1 jim jim      90 Oct 1 12:00 bin
drwxrwx---. 1 jim jim      90 Oct 1 12:00 dev
d?????????? ? ?   ?         ?           ? remotemount
drwxrwx---. 1 jim jim      90 Oct 1 12:00 tmp

Seeing that root cannot access the remotemount directory is rather odd. Is this expected behavior? If so, why? If not, any lead on how to go about fixing it will be helpful. Thanks.


Solution 1:

This is by design in fuse as a security measure. Pass the -o allow_root or -o allow_other option when mounting the filesystem with sshfs.

It is in place to prevent from root from being nosy on shared systems.