Rsync: windows 7, synology: login error and permission denied error

rsyncsynology

Good day to all of you all,

I'm running into strange/stupid errors, and I hope anybody would be so kind to help me out. I have to admit, I am by no means a guru, so please bear with me 🙂

Situation:

  • Synology NAS (runs Linux), and Windows 7 desktop (1 normal/restricted user Lisa and 1 admin user).
  • Data from W7 desktop to be rsynced to synology: /volume1/home/Lisa/Backup
  • Rsync command: c:\cygwin\bin\rsync -avz /cygdrive/e/Lisa/ Lisa@192.168.1.10:/volume1/homes/Lisa/Backup
  • I've set up ssh per these two threads:

Now the horrors begin:

  • root is allowed to run the rsync succesfully, however, he doesn't login automatically (so I can not use rsync in W7 batchscripts, which is of course required).
  • Lisa is allowed to login automatically but he can not succesfully finish the rsync command because of permission errors:
    • rsync change dir /volume1/homes/Lisa/Backup failed: permissions denied.

This happens for each and every file and subdir rsync tries to create. However, the main directory (Backup) is created.
When I try to copy files from windows explorer to the directory 'Backup' using the very same user Lisa everything goes smoothly.

So, obviously, there is a permission problem somewhere; either my rsync-command isn't correct, or the folder permissions for homes/Lisa aren't correct (but, then again, Windows 7 copies files to that folder without any problems, so that does make me believe the homes/Lisa-permissions don't appear to be the problem).

I also tried adding: --chmod=Dugo+x --chmod=ugo+r which I found somewhere on the web, to the rsync-command, but this didn't solve any problem and gave the exact errors.

Would anybody please please help me on how to fix this? I am utterly frustrated about this, because I have been trying for 1 month to get everything to work and it simply doesn't work. I bought the big Synology to end the horrors of 20 external USB-disks for once and for all (we have many pictures and home vids of our deceased dogs and want to watch these, the horrors being 'what material is on what disk').

I'll gladly return the favour of somebody helping me out by buying you a nice beer (paypal), if you could end my misery.

I am not extremely skilled on Linux (not at all 🙁 ) so if you could give an extra word when possible so I understand what to do, I'd be very grateful.

I really hope somebody can help me out,

Thank you in advance,

Lisa

Best Answer

RSync uses something call a 'module name' it's kind of like a 'share name' (for windows). The Synology's default 'module name' for RSync is NetBackup (I assume it's case sensitive). So if you change your command it should work:

From: c:\cygwin\bin\rsync -avz /cygdrive/e/Lisa/ Lisa@192.168.1.10:/volume1/homes/Lisa/Backup

To: c:\cygwin\bin\rsync -avz /cygdrive/e/Lisa/ rsync://Lisa@192.168.1.10:873/NetBackup/volume1/homes/Lisa/Backup (Pardon the Line Wrap, that should be all be one line, with no carriage return / Line Break)

The last part may work without explicitly specifying the protocol (rsync://), and port (:873), just make sure the 'module name' 'NetBackup/' precedes the path.

Additionally make sure that the 'user account' that you picked has full read / write permission on the 'NetBackup' share in the Synology via this link: http://www.synology.com/tutorials/how_to_backup_Linux_computer.php?lang=us

I saw something in the documentation stating to use either the 'admin' account, or the 'rsync' account. (I always use the 'admin' account). I don't know that other users will work (on older DSM 3.0 or less firmware, as there is nowhere to add user permissions for this). On the newer DSM 4.0+ firmware you have to specifically enable that user for 'Network Backup Privilege' via the above link. Another note about setting up RSync on the older DSM 3.0- firmware (Not for your problem, but it may help others).Is that the Procedure is: Click the Downward arrow (in the upper left) > Click 'Backup and Restore' > Check the 'Enable network backup service' box. Then use only 'admin', or 'rsync' as users for rsync.

This has some easy to read info on RSync / module name (Not specific to Synology): http://www.backupassist.com/education/articles/configuring-backupassist-for-rsync-without-ssh.html

You can actually create other 'module names' for the Synology by modifying the rsync config file on the Synology via ssh (not 100% sure about it's name, I assume it is rsyncd.conf)