I have an NFS_Server - NFS_Client system. My client is mounted to an NFS_Server directory. I want to change the attribute of NFS_Server directory's files via NFS_Client mounted directory by using Extended File Attributes (xattr).
When I tried to set an attribute from the client side, it gives the following answer:
root@ubuntu:/mnt/nfs/var/nfs# setfattr -n user.comment -v "some comment" test.txt
setfattr: nfs.txt:
Permission denied
My question is:
is it possible to use Extended File Attributes via NFS?
if possible, how can I do this?
UPDATE:
Server side:
$ more /etc/exports file has:
/var/nfs 192.168.56.123(rw,sync,no_subtree_check)
Client side:
$ root@ubuntu:/# mount -t nfs
192.168.56.130:/var/nfs on /mnt/nfs/var/nfs type nfs (rw,vers=4,addr=192.168.56.130,clientaddr=192.168.56.123)
thank you...
/etc/idmapd.conf
. By default, an NFS server will translateroot
on the client tonobody
on the server, which is why I think runningsetfattr
as root might be getting a permission denied error. – Elsewhereno_root_squash
, which will allowroot
on the NFS client to beroot
on a server, thesetfattr
error message will change from Permission denied to Operation not supported. mount will accept anacl
option but not auser_xattr
option for an NFS filesystem. – Elsewhere