Ubuntu – Mount SSHFS via FSTAB – Permissions Problem

network-attached-storagesshsshfsUbuntu

I am having trouble mounting a remote file system via SSHFS/Fstab. The Client is a Ubuntu 10.10 box. The remote device is a Netgear ReadyNAS Pro. I created ssh keys already and can login without a password from the Ubuntu device to the NAS.

If I SSH to the device and then cd to the /c/backup directory I can read/write without problems. When I mount with fstab, I get a successful mount, I just cant access it. I am being told I do not have permission. dmesg is not giving me any hints. The line in my fstab is:

sshfs#user1@192.168.120.28:/c/backup /home/user1/NAS-28/backup fuse user 0 0

user1 is a member of the fuse group. The permissions on /c/backup on the remote device are 777, nobody:nogroup. I would like to keep the owner/group the same because windows clients map this drive in their login scripts and I would not want to interfere with that. /home/user1/NAS-28/backup exists locally, and the permissions are 777, user1:user1.

Any ideas? I can provide any information needed.

Thanks in advance

Best Answer

After you have mounted the dir, what permissions does /home/user1/NAS-28/backup have?

Also, have you tried cutting fstab out of the equation with the sshfs command?

sshfs 192.168.120.28:/c/backup /home/user1/NAS-28/backup

That is just to make sure it isn't a problem with the mount method.

Additionally, you could try NFS-mounting to see if the problem is only when mounting over sshfs. NFS is also quite a bit faster than SSH, so if you are on a LAN and don't require the encrypted connection you are probably better off with NFS.