0

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.

enter image description here

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)

0

1 Answer 1

0

Turns out this was down to the domain being different on the NAS and the server!

hostname -d on the ReadyNAS came back blank, and hostname -d on the Ubuntu server came back mshome.net.

I changed it with: nano /etc/hosts

and updated: 127.0.1.1 testserver.mshome.net testserver

to 127.0.1.1 testserver

Rebooted with: shutdown -r now

and it all started working as expected (think I possibly remounted the share as well, but not 100%)!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .