I've mounted a file system under SSHFS that I previously was using with NFS4 without issues.

user@server:/mnt/a/folder  /mnt/folder fuse.sshfs  defaults,default_permissions,_netdev,allow_other,uid=1000,gid=1000  0 0

and with NFS

server:/mnt/a/folder  /mnt/folder nfs4  defaults,default_permissions  0 0

The SSHFS folder mounts and the directory permissions look the same as they are on the remote machine, but when I try to modify/add a file on the file system that belongs to the owning user, I get a permission denied error.

Users on the remote and client machine have the same UID/GID. The file is being mounted under fstab and version 2.5-1ubuntu1 of SSHFS.


First log into the server, then go to the shared folder /mnt/a/folder and ensure you you have write access.

I tested your fstab entry and got the same error you're describing. Then I tested the change and get the response you are looking for.

Your fstab entry:

[user]@server:/mnt/a/folder  /mnt/folder fuse.sshfs  defaults,default_permissions,_netdev,allow_other,uid=[user],gid=[user]  0 0

The change:

[user]@serer:/mnt/a/folder /mnt/folder fuse.sshfs  defaults,default_permissions,_netdev,allow_other,uid=[user],gid=[user]  0 0

Change the [user] to the user with ssh access. Of course, don't include the brackets.

By the way, I understand you've already checked and verfied that [user] on the local computer and [user] on the remote computer has the same uid and gid, whereas they were inadvertently different for my environment. But something is going wrong and the only detail that I can see is this which works when using the added assurance of the specific user and group ID by the name as it appears on the server.

|improve this answer|||||
  • Thank you for the help. I ended up going back to NFS, but I understand what you were asking me to change and why it works. – user1884067 Oct 1 '16 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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