We have a Netgear ReadyNAS 316 set up to replace an older ReadyNAS Ultra 6 which died, but we're having trouble getting permissions working as they did on the Ultra 6.
Basically we're using the NAS for backing up many terabytes of large audio files from our webserver. They're accessed by Apache with the owner as www-data, and the group as www-data. We want to be able to RSync files from the webserver, to the ReadyNAS, and keep the www-data owner and group on all the files.
For reference, the RSync command we are using is:
rsync -avr --progress /webfolder/ /media/netgear02/RSyncTest/
I mounted the NAS share on our Ubuntu 12.04 server with the following command:
mount 192.168.5.10:/Netgear02/media /media/netgear02
But an ls -al
in the /media
folder (of our Ubuntu server), shows the permissions aren't "read" correctly(?):
drwxrwxrwx 1 nobody nogroup 494 Jul 17 14:39 netgear02
I enabled SSH on the ReadyNAS and logged in as root to see what was going on, and checking the permissions of /Netgear02/media
folder, they are:
drwxrwxrwx+ 1 root root 494 Jul 17 14:39 media
So the owner and group are actually root, but when mounted it's not getting the "proper" permissions.
On our old Ultra 6, all we had to do was add no_root_squash
to /etc/exports
and run exportfs -ra
, and we were away, but it seems to have no effect on this new OS 6 software ReadyNAS.
There's a checkbox in the NFS share settings for "root access" which I thought might solve it.
When I check that box and click apply, it seems to just modify /etc/exports to the following:
"/homes" *(insecure,insecure_locks,root_squash,anongid=99,anonuid=99,no_subtree_check,rw,sync)
"/run/nfs4" *(ro,sync,insecure,insecure_locks,root_squash,anongid=99,anonuid=99,no_subtree_check,fsid=0)
"/run/nfs4/Netgear02" *(ro,sync,insecure,insecure_locks,root_squash,anongid=99,anonuid=99,no_subtree_check,fsid=16368026699721582927)
"/run/nfs4/Netgear02/media" 192.168.5.9(insecure,insecure_locks,no_subtree_check,rw,no_root_squash)
"/Netgear02/media" 192.168.5.9(insecure,insecure_locks,no_subtree_check,rw,no_root_squash)
None of these seem to have any effect, I unmounted/remounted the share, and it still gets mounted as nobody:nogroup.
Sorry about the lengthy question! Just looking for any ideas at all!
Edit - Forgot to say, when I try and actually RSync files, regardless of the nobody:nogroup, I get all these messages come up, one for every file:
rsync: chown "/media/netgear02/RSyncTest/test.log" failed: Invalid argument (22)