2

I wanna do daily ssh synchronization of some of my local machines files with my server. I want to do this via rsync, since it sounds the most promising tool for this task to me.

Sadly I get the following error after using:

rsync -avc -e ssh Studium [email protected]:/backup

rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: mkdir "/backup" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(605) [Receiver=3.0.9]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]

It seems to me that something with the permissions on the server is not set right. I dont really know how to set permissions, maybe somebody could help me?

On client side I use Opensuse 12.3 and on Server Debian.

2 Answers 2

1

Seems you are trying to create a directory on the root directory '/' which the user cannot access

rsync -avc -e ssh Studium [email protected]:/backup

rsync: mkdir "/backup" failed: Permission denied (13)

Try to run the same command as user root, or using a directory you can actually access.

2
  • thx for your answer. I tried: rsync -avc -e ssh Studium [email protected]:/home/jakob/backup it throws the same with rsync: mkdir "/home/jakob/backup" failed: Permission denied (13) Oct 24, 2013 at 15:02
  • But the question is: does the folder /homejakob/backup already exist, or does it need to be created? You should create on the local machine, before the remote machine can use it. If, after having created it, you are still getting a Permission denied error message, it means you are not logging in correctly. Oct 24, 2013 at 18:36
1

The best way to fix this is to create the destination directory in advance (/backup, home/user/backup or whatever you want to use), and give the necessary permissions.

For /home/user/backup you can give elevated permissions to /home/user and it should work, but I definitely do not recommend this! And of course, this doesn't work if you want to backup to /backup.

You must log in to answer this question.

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