Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 to backup an Ubuntu Server server. I'm getting a lot of permission denied messages. Is there a command I can use to see exactly what directories were denied? I could scroll back up through all the files, but that would take forever. Any help would be greatly appreciated.

share|improve this question
up vote 2 down vote accepted

Run the rsync again, but drop the -v (so that you only see errors, rather than a complete work log) and add -n (which 'emulates' the rsync, saving you the time of actually transferring the files.)

You could also leave the -v, but use shell redirection to send errors to a different log. The following should work:

rsync -alv -e "ssh -l root" foo:/ /backups/foo/ > r.log 2> r-error.log 


share|improve this answer
Thanks. I'll try that as soon as the backup finishes. – Arthur Dec 31 '11 at 18:57

You could use grep to search through the warnings / errors - but you'd probably need to run the rsync again to be able to save the output to do this. (Or save your screen buffer to a file so that you can grep through it.)

What are you backing up? The entire server? If so, just make sure you're doing it as root, otherwise this will be an expected issue - as there will be at least several files that aren't readable to anyone other than root.

Additional details at, including:

The rsync daemon is an alternative to SSH for remote backups. Although more difficult to configure, it does provide some benefits. For example, using SSH to make a remote backup of an entire system requires that the SSH daemon allow root login, which is considered a security risk. Using the rsync daemon allows for root login via SSH to be disabled.

share|improve this answer
The command I used was, sudo rsync -av *******:/ /media/backup1/ubuntubackup. I am backing up an Ubuntu server. I'm guessing not logging in as root is the problem. However, I don't know how to login as root, as I can't issue the sudo command once logged in through Rsync. The backup just starts. I apologize if this is a noob question, but do you have any advice on how to access the Ubuntu server as root through Rsync? If not, I'll post that question by itself. – Arthur Dec 31 '11 at 19:03
@Arthur - see – ziesemer Dec 31 '11 at 19:05
Thanks for the info. – Arthur Dec 31 '11 at 21:11

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.