Translate permissions with as sshfs remote mount?

I have two computers on a network, call these Q and X. I want to mount via sshfs X:/ to Q:/mnt/X. So to do this I use:

user@Q $ sudo sshfs root:X/ /mnt/X

This successfully mounts it and allows the files to be visible to root@Q. However if I do:

user@Q $ sudo ls /mnt/X

I can't see the contents because user@Q apparently doesn't have the permissions. Even though:

user@Q $ ls -ld /mnt/X
drwxr-xr-x 1 root root 4096 Aug 30 10:52 /mnt/X

Which implies ordinary users should have permissions to descend into the directory due to the x bit.

How to mount it in such a way that the permissions are kept and anyone under "other" can view the contents as if they could if they were on the original machine?


Solution 1:

Right, in case anyone sees this later as search result, the answer was:

sudo sshfs -o allow_other,default_permissions X:/ /mntX

I had tried both allow_other (which gives every user read and write access to the root of the other machine, bad idea) and default_permissions (which does nothing) alone. Turns out that if you combine them then it respects the permissions. Be sure that usernames are the same across machines though or you might allow someone to write into the home directory of another machine of an account he or she doesn't own.