Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
    
have you tried to add -o idmap=user during sshfs? –  Chenming Zhang Sep 26 '13 at 12:13
add comment

2 Answers

up vote 0 down vote accepted

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.

share|improve this answer
    
It ended up working after a reboot. For some reason, the desktop icon that was created when it was mounted, was trying to open in gedit. No clue why, thats what was giving the error. The actual mounting worked fine. –  Justin S Mar 4 '11 at 18:14
add comment

This is over SSH tunnel, so only user1, or whoever the owner of the SSH key is, will have access.

share|improve this answer
add comment

Your Answer

 
discard

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.