Permission problems with rsync

12,580

Solution 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.

Solution 2

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.

Share:
12,580

Related videos on Youtube

Jakob Abfalter
Author by

Jakob Abfalter

Updated on September 18, 2022

Comments

  • Jakob Abfalter
    Jakob Abfalter over 1 year

    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.

  • MariusMatutiae
    MariusMatutiae over 10 years
    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.