1

I'm using rsync between two servers to transfer files.

The problem is some files are not transferred. I get this error : rsync: readlink "/var/www/index.html" failed: Permission denied (13)

So I check permissions on the server and after make tests, I notice a file is transferred only if it has these permissions : R-W ! If the file have these permissions : R--, Rsync can't download it !?

Command:

/usr/bin/rsync -avzr -e "/usr/bin/ssh -i /home/replication/thishost-rsync-key" replication@192.168.1.10:/var/www/index.html ./

Is it a bug with Rsync ? I find any information about this problem.

Thanks for your help

Debian Etch 2.6.30 Rsync 2.6.9 protocol version 29

2 Answers2

1

rsync needs to be able to read the files you are trying to copy, so my guess is that the user running rsync does not have read permission on the file in question.

If that's the case, you can either grant read access on the file to that user, or use a different account that already has read access on all the files you are trying to copy.

If that's not the problem, please post the output of ls -l /var/www/index.html

D_Bye
  • 401
  • 2
  • 5
1

To verify it's a permission thing as rsync tells, try:

ssh replication@192.168.1.10 "ls -al /var/www/index.html"
or
ssh replication@192.168.1.10 "ls -al /var/www/"

Take a look if some files that do not get transferred are symlinks that point outside the tree; if so, take a look at the --safe-links or --copy-links arguments.

Either change the permissions or change the user.

You could give more "verbosity" to rsync like with rsync -avvv [...] to see even more error messages.

The "r" parameter is not needed as "a" defaults to "-rlptgoD". And as you copy recursively, leave out the "index.html", just write "/var/www/" with the trailing slash.

initall
  • 2,205
  • 3
  • 18
  • 19