1

I have a ubuntu 20.04 server I just set up and I'm trying to backup a few windows computers to it using rsync over ssh.

I've set up password less keys and that seems to work. I've also setup the authorized_keys file on my ubuntu server so that only the rsync command can run using that key. I'm trying to automate the backup.

The problem is that I'm getting lots of errors that look like this:

rsync: recv_generator: mkdir "/media/store/Shares/Photos" failed: Permission denied (13) > *** Skipping any contents from this failed directory ***

I believe the reason is because on the windows pc, that photos folder belongs to someone who is not me...though I am the main admin on the pc and have full rights too to the folder.

The command I'm running in Cygwin is (minus anything identifying):

/bin/rsync -avrz "/cygdrive/z" --exclude='AppData' --exclude='Application Data' --exclude='NTUSER*' -e "ssh" steve@123.123.123.123:shares

And the authorized_keys file looks like this:

command="rsync --server -vlogDtprze.iLsf . /media/store/shares" ssh-rsa AAAAB3Nza.....etc

Most files transfer, but if windows user "bob" goes and makes a new folder on the windows z drive, for some reason this script is erroring out when trying to copy his folder. I'm not sure why or how to fix this.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
user614004
  • 11
  • 1

0 Answers0