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 0and with NFS
server:/mnt/a/folder /mnt/folder nfs4 defaults,default_permissions 0 0The 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.
1 Answer
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 0The change:
[user]@serer:/mnt/a/folder /mnt/folder fuse.sshfs defaults,default_permissions,_netdev,allow_other,uid=[user],gid=[user] 0 0Change 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.