Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 !?


/usr/bin/rsync -avzr -e "/usr/bin/ssh -i /home/replication/thishost-rsync-key" replication@ ./

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

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

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

ssh replication@ "ls -al /var/www/index.html"
ssh replication@ "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

Your Answer


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