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 copying some files (all except hidden ones) using rsync from one place to another using this command:

rsync -Cav --delete --exclude=.* /Some/Directory/ other-host:/Other/Directory

It works nice except that I get the following errors:

rsync: chgrp "/Other/Directory/." failed: Operation not permitted (1)
rsync: failed to set times on "/Other/Directory/.": Permission denied (13)

That is understandable because I do in fact not have those permissions, and I also do not want to change the group of that directory. I only want to do this for all the files and directories that are in that directory. Is there any way to solve this? Tried to --exclude=. and --exclude=./, but those didn't work.

Any ideas? I have no idea how to fix this...


More details: This is on Mac OS X, and the directories I am syncing is from a local mounted volume to the /Users/Shared/ directory on the other host. That directory has user root and group wheel. The files inside it has user admin and group staff and so does the local source directory.


Temporar solution: Still curious how I can solve this, but since I don't know how to do that yet, I "solved" this by using a different directory than /Users/Shared for those files.

share|improve this question
add comment

1 Answer

If you know that other-host:/Other/Directory already exists you could try:

rsync -Cav --delete --exclude=.* /Some/Directory/* other-host:/Other/Directory/

then it shouldn't try to do anything with the root directory other than create files/dirs in it.

share|improve this answer
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.