LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   rsync: mkdir "/home/backup" failed: Permission denied (13) (https://www.linuxquestions.org/questions/linux-server-73/rsync-mkdir-home-backup-failed-permission-denied-13-a-4175418428/)

gorgabal 07-24-2012 11:07 AM

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

I am trying to backup some drives mounted under /mnt to a personal backup server.

I keep getting this error:
Code:

koen@Koen-Desktop:~$ rsync -vrlzHPh --exclude='*Private' -e ssh /mnt/ koen@192.168.0.190:/home/backup
sending incremental file list
rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: mkdir "/home/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]

/home/backup is the mountpoint of an external usb-drive on the server. permissions seems to be correct. (i know it is not secure, but the server will only be turned on when i make a backup, so it does not really matter)

On the server:
Code:

koen@koen-server:~$ ls -lh /home/koen/
totaal 768K
drwxrwxrwx 2 koen koen 760K jul 24 17:50 backup
drwxr-xr-x 2 koen koen 4,0K jul 23 12:12 test
koen@koen-server:~$ ls -alh /home/koen/backup/
totaal 768K
drwxrwxrwx 2 koen koen 760K jul 24 17:50 .
drwxr-xr-x 8 koen koen 4,0K jul 23 12:12 ..

any idea why this is going wrong?

sag47 07-24-2012 11:24 AM

In your command you're using "/home/backup" but when you do file listings to show permissions you show "/home/koen/backup/". One of those paths are wrong.

Also check the permissions to /mnt on the client and be sure that koen has read permissions to whatever it is you're trying to sync. Perhaps what you want is...
Code:

koen@Koen-Desktop:~$ rsync -vrlzHPh --exclude='*Private' -e ssh /mnt/ koen@192.168.0.190:backup

gorgabal 07-24-2012 11:46 AM

Quote:

Originally Posted by sag47 (Post 4736870)
In your command you're using "/home/backup" but when you do file listings to show permissions you show "/home/koen/backup/". One of those paths are wrong.

Also check the permissions to /mnt on the client and be sure that koen has read permissions to whatever it is you're trying to sync. Perhaps what you want is...
Code:

koen@Koen-Desktop:~$ rsync -vrlzHPh --exclude='*Private' -e ssh /mnt/ koen@192.168.0.190:backup

I feel so stupid because i did not see that myself... but it works! thank you!
For anybody who made the same mistake: i used this command:
Code:

rsync -vrlzHPh --delete --exclude='*Private' -e ssh /mnt/ koen@192.168.0.190:/home/koen/backup


All times are GMT -5. The time now is 07:43 AM.