Rsync error cannot do ssh and transfer file
Hi,
I am trying to transfer a folder from one machine to another machine using ssh and rsync. I doing rsync has root. I am getting the following rsync error. rsync: Failed to exec /var/lib/postgresql/7.4/: Permission denied (13) rsync error: error in IPC code (code 14) at pipe.c(83) rsync: writefd_unbuffered failed to write 4 bytes: phase "unknown" [sender]: Broken pipe (32) rsync error: error in rsync protocol data stream (code 12) at io.c(1099) I tried changing the file permissions too... |
Could you post your rsync command? The permission error could be on the source system or the target system
|
My rsync code:
rsync -av -e /var/lib/postgresql/7.4/ ssh root@<ip address>:/var/lib/postgresql/7.4/ |
Are you running as root on the source machine? Is /var/lib/postgresql/7.4 a network share on either the source or target machine (that can cause problems if running as root)?
|
Is your 'ssh' in the right place ? Should it be ...
Code:
rsync -av -e ssh /var/lib/postgresql/7.4/ root@<ip address>:/var/lib/postgresql/7.4/ |
ssh is in the right place. I am doing ssh on the source machine to connect to the target machine.
|
Are you logged in as root on the source machine ?
|
No. I am not logged in as root on the sourse machine. I am accessing target machine as root.
|
So could the permission denied error be "read" permission on the source machine then? What does the following return on the source machine?
Code:
ls -l /var/lib/postgresql/7.4/ |
Quote:
|
Quote:
|
Yes. It has read access. I changed the user permission.
|
I definitly think your command is wrong and you need to rewrite it as I suggested earlier to ..
Code:
rsync -av -e ssh /var/lib/postgresql/7.4/ root@<ip address>:/var/lib/postgresql/7.4/ Code:
rsync -az -e ssh ~ftp/pub/samba/ nimbus:"~ftp/pub/tridge/samba" I think the other clue is that your error is "failed to exec". Its trying to run /var/lib/postgresql/7.4 because you've told rsync this is the shell you want to use |
Quote:
|
All times are GMT -5. The time now is 04:04 PM. |