Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using rsync to synchronize folders between two Ubuntu Lucid Lynx systems.

rsync -az --delete -e "-i /home/ruser/.ssh/id_rsa_ruser -p 200" 
          /usr/local/folder/ ruser@192.168.1.2:/usr/local/backup/folder/

Everything is going fine except I am getting following problem:

rsync: failed to set permissions on "/usr/local/backup/folder/README.txt": 
         Operation not permitted (1)

On remote system (192.168.1.2) ruser is member of tnr group which is owner of /usr/local/backup/folder/. The folder's permissions are as follows:

drwxrwxr-x 3 tom tnr 188416 2011-06-20 18:04 folder

Please help me to resolve the error or any method to bypass changing permission setting by rsync.

EDIT:- I had sorted this out by creating group tnr on source server and setting it as owner of source folder.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You cannot change the file timestamps or change permissions by being a member of a group, you have to be the file owner, or root. If you cannot be the other of that file, you might need to avoid trying to set permissions at all. You can do this with the perms option (after your other options because -a includes a bunch of stuff including the positive of this) like so:

rsync -az --no-perms

You can see some discussion about the underlying systems involved on this related question.

share|improve this answer
    
Thanks but I had sorted out it some other way, but will definitely give this a try next time. Moreover I was not able to find --no-perms on any man page hosted on various sites, which I was looking for. –  TheVillageIdiot Jun 22 '11 at 3:34
1  
It's in the GNU rsync man page. --no-OPTION is described as a way to turn off options that were implied by others (such as -a). The --no-perms possibility is specifically mentioned as a likely candidate for this. –  Caleb Jun 22 '11 at 7:29
add comment

Your Answer

 
discard

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.