# rsync -axP /mnt/nilesh_rjoshi /nilesh_rjoshi
While performing rsync I got errors like -
rsync: send_files failed to open…Permission denied (13)& at the end of rsync
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
The problem was NFS share options was not set properly. we need to use NFS option anon.
share -F nfs -o ro=@xx.xx.xx.xx/xx,anon=0 /nilesh_rjoshi/
what anon=uid do?
If a request comes from an unknown user, use uid as the effective user ID.
Note: Root users (uid 0) are always considered ``unknown'' by the NFS server unless they are included in the root option below.
The default value for this option is 65534. Setting anon to 65535 disables anonymous access.
Also if you put value like -1 then disables anonymous access. So if you set anon to -1 it prevents access to root on clients (unless specified using the root option in /etc/exports or dfstab in case of Solaris) and also prevents access to users not defined on the server.
Thanks for solution to My UNIX Guru Alex!
Hi, where did you apply that "anon=0" option?
ReplyDeleteOn the server machine running nfsd, or on fstab of the client?
I have tried adding anon=0 to /etc/exports on the server - that gives me an error when restarting nfsd, and i have also tried putting anon=0 in the fstab options on the client, again with an error. both errors are along the lines of "anon=0 not recognized". I would appreciate your reply, thanks!
Hi Milos, please try to use anonuid=0 (user root) or anongid=0 (group root).
ReplyDeleteBest Regards.
Fabio Monteiro
# sample /etc/exports file
ReplyDelete/ master(rw) trusty(rw,no_root_squash)
/projects proj*.local.domain(rw)
/usr *.local.domain(ro) @trusted(rw)
/home/joe pc001(rw,all_squash,anonuid=150,anongid=100)
/pub (ro,insecure,all_squash)
/etc 192.168.0.0/24(ro,sync,no_subtree_check,no_wdelay,no_root_squash)
/srv/www -sync,rw server @trusted @external(ro)
Either use "anonuid" or "anongid" under /etc/exports or simply you can use "anon" in the command as shown in below example.
ReplyDeletee.g.
# share -F nfs -o ro=@xx.xx.xx.xx/24,anon=0 /home
Thanks/Nilesh