I am trying to run a simple rsync script from my CentOS server to copy files and folders to a mounted NFS share on my Synology NAS. The NFS share is mounted to the CentOS server fine. I can create files and browse it without problems from the CentOS server. I have the NFS share mounted at /mnt/nfs/synology.
The directory I am looking to copy is located at ~/resilio-sync/websites. The rsync command is rsync -avz ~/resilio-sync/websites /mnt/nfs/synology If I do a dry run it shows me what's going to be copied just fine.
sending incremental file list websites/ websites/test.co.uk/ websites/test.co.uk/about.php websites/test.co.uk/contact.php websites/test.co.uk/dropbox_backup.sh websites/test.co.uk/index.php websites/test.co.uk/mailer.php sent 6132 bytes received 973 bytes 14210.00 bytes/sec total size is 29217828 speedup is 4112.29 (DRY RUN) When I try and run it for real I get this:
sending incremental file list websites/ rsync: failed to set times on "/mnt/nfs/synology/websites": Operation not permitted (1) websites/.sync/ rsync: recv_generator: mkdir "/mnt/nfs/synology/websites/.sync" failed: Permission denied (13) *** Skipping any contents from this failed directory *** websites/test.co.uk/ rsync: recv_generator: mkdir "/mnt/nfs/synology/websites/test.co.uk" failed: Permission denied (13) *** Skipping any contents from this failed directory *** sent 5196 bytes received 37 bytes 10466.00 bytes/sec total size is 29217828 speedup is 5583.38 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9] I'm guessing it's telling me that it's permission related, but the strange thing is that I can write to both the source and destination directories just fine if I am not using rsync.
Any ideas what I am missing here?
rsynccommand as root, or some ordinary (non-privileged) account? (If you're usingsudo rsync...then it's still considered as root.)mkdir /mnt/nfs/synology/websites/test.co.ukas exactly the same account from which you're running yourrsynccommand?