I use SSHFS to mount a directory on a remote server. There is a user xxx on client and server. UID and GID are identical on both boxes.

I use

sshfs -o kernel_cache -o auto_cache -o reconnect -o compression=no \ 
      -o cache_timeout=600 -o ServerAliveInterval=15 \
      xxx@yyy.yyy.yyy.yyy:/mnt/content /home/xxx/path_to/content

to mount the directory on the remote server. When I log in as xxx on the client I have no problems. I can cd into /home/xxx/path_to/content.

But when I log in on the client as another user zzz and then

$ ls -l /home/xxx/path_to

I get this

d?????????   ? ?    ?        ?                ? content

and on

$ ls -l /home/xxx/path_to/content

I get

ls: cannot access content: Permission denied

When I do

$ ls -l /mnt

on the remote server I get

drwxr-xr-x 6 xxx xxx  4096 2011-07-25 12:51 content

What am I doing wrong? The permissions seem to be correct to me. Am I wrong?

  • Log in as xxx user and give us the output of ls -ld /home/xxx/path_to/content? – quanta Jul 26 '11 at 8:24

I've found the answer myself. The problem was that I didn't use the option allow_other.

sshfs -o allow_other -o kernel_cache -o auto_cache -o reconnect \
  -o compression=no -o cache_timeout=600 -o ServerAliveInterval=15 \
  xxx@yyy.yyy.yyy.yyy:/mnt/content /home/xxx/path_to/content

To use this option you have to set the option user_allow_other in /etc/fuse.conf. When I did this I had another problem. The file /etc/fuse.conf haven't had read permissions for other users on my Ubuntu box. So I've changed that too and now I can access the directory with any user.

  • 4
    The /etc/fuse.conf file is not supposed to have read options for everyone. The intent is that you add yourself to the fuse group so that you can read it via group rights. – Jherico Dec 27 '12 at 18:32
  • 1
    Confirming that the need to enable user_allow_other in etc/fuse.conf on the client was required for my user to access folders outside of my home directory on the server when accessing the server from an identical UID and GID. Being in the fuse group on the client was sufficient for me to read /etc/fuse.conf on Ubuntu, as I found the file was set rw_r______ root:fuse – user163794 Mar 10 '13 at 6:38
  • If you intend to use the allow_other mount option like the answer above suggests, be aware that the Linux kernel has an unresolved security bug that affects FUSE. See github.com/libfuse/libfuse/issues/15 – MountainX Feb 12 '18 at 10:14

protected by Michael Hampton Jan 14 '14 at 17:21

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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