Permission denied: rsync backup from my Fedora box to my DS207+ (DSM 2.3) NAS….

I’ve got a NAS that I’m very happy with; the DS207+ from Synology. I back up my wife’s massive Photoshop and Ilustrator files from her Mac without problems (using Superduper) – however, backing up stuff from my Linux box (Fedora) has turned out to be a little bit more tricky. I might have set up the DS207+ wrongly with respect to the users, groups and privileges from the start (I’ve had the box longer than I’ve had Linux) but regardless of what the reason is the practical problem is that trying to back up to the server – using DejaDup or grsync (can be found in the standard repositories both for Ubuntu and Fedora) – fails with “access permitted” problems.

I’ve tried to rsync using the server’s IP address;

and I’ve tried to use a mount point after adding a cifs mount statement to my fstab file:

// /mnt/ds_jarl cifs credentials=/etc/.ds_credentials,_netdev 0 0

To no avail and still I get problems with rsync throwing up “Permission denied (13)” errors when it tries to create (or delete) directories.

From what I’ve been able to gleam from various fora there seems to be an issue that quite a few people have been struggling with in one form or other. If this is related to a subtle difference in the use of CIFS or Samba I don’t know but the bottom line is that it doesn’t work…for me at least.

Anyway, here be what I did to make this work for me. It might not work for you but hopefully it will give you a possible avenue to try out, should you have problems getting rsync to work with your DS207+.

  • Firstly I followed the instructions here to create an ssh key file. I subsequently copied one into my /home/jarl/.ssh folder (had to create it first) as per instructions. I also copied it over to a new /homes/admin/.ssh folder on the DS207+ (simply using the File Station.) Following that I could ssh in without entering a password BUT as opposed to what the instructions on said web site says I had to specify that I was the “admin” user for this to work. I believe this has something to do with the limitations on who can ssh into the DS207+. In short, the ssh line to log in had to be this:
    • ssh -l admin -i /home/jarl/.ssh/rsync-key
    • NOTE: the use of “-l admin” here!
  • Next I could compose the full rsync command line and instruct it to use ssh (as admin!) to connect to my NAS and do it’s thing:
    • rsync -rv -o -c -z -e ssh -l admin -i /home/jarl/.ssh/rsync-key /home/jarl/
    • NOTE: I composed the whole command line using grsync and just added the -e ssh… part manually

This works fine now, although all the files sync’d up are owned by “admin” of course…

I will try to make this work for the standard user as well; it makes no sense that you should have to be admin to make this work..!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s