Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Mar 9 '11 at 13:34

This question came from our site for professional and enthusiast programmers.

    
whats the output of ls -al /var/www/index.html –  pablo Mar 9 '11 at 13:38
add comment

2 Answers 2

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.