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 XXXXX@yyy.yy.y.yy:/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.


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

rsync -avc -e ssh Studium XXXXX@yyy.yy.y.yy:/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.

  • thx for your answer. I tried: rsync -avc -e ssh Studium jakob@XXX.XX.X.XX:/home/jakob/backup it throws the same with rsync: mkdir "/home/jakob/backup" failed: Permission denied (13) – Jakob Abfalter Oct 24 '13 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. – MariusMatutiae Oct 24 '13 at 18:36

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.

protected by JakeGould Oct 20 '15 at 0:24

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.