I have a very strange problem with a NFS mount. I have a Synology NAS serving the home directories for a set of linux machines (Archlinux for the moment). The used protocol is NFS V3.
When I log into the machines using my main user, I can see that I have write permission to my home folder:
$ ls -ld ~
drwx------ 28 cwolf cwolf 4096 26. Feb 15:10 /home/cwolf
I can create and remove files. So the folder is in fact writable.
Now I see a strange behavior. Issuing
$ test -w ~; echo $?
1
indicates that I do not have write permission on my home folder.... This makes KDE to reject from running as it thinks it cannot write to the home folder.
Trying the same with a local user (whose home folder lies completely on the local hard disk), everything is consistent. So the test returns 0
.
Can anyone tell me where I can look to solve the problem and make test return the correct value? Also the question is if this is more likly a problem on the NFS server or on the NFS client.
Additional information:
The problem is not related to root_squash
as in the exact same session I can do touch foo
/rm foo
to create and remove a file foo
successfully. So the server accepts my commands as user.
Most of the information in the internet is related the other way around: The user is shown to have write access but gets remapped on the server to nobody
due to squashing. My problem is that my rights are accepted but shown falsely as read-only rendering tests to fail.
As requested by the comments here the export options on the server:
/volume1/cloud 134.96.8.160/27(rw,async,no_wdelay,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)
The mount options (corresponding line from the output of mount
) are:
ds2.lsr.uni-saarland.de:/volume1/cloud on /home type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=134.96.8.162,mountvers=3,mountport=892,mountproto=tcp,local_lock=none,addr=134.96.8.162)
/home/cwolf
. Theroot_squash
doesn't prevent root from writing; rather, it translates root access to the anonymous/nobody user. If this user can write to a location then root can do so even withroot_squash
active.cwolf
in/home/cwolf
. No userroot
is involved.