rsyncing a r/o-permissioned tree?

Aaron Davies aaron.davies at
Thu May 15 20:31:13 GMT 2008

On Thu, May 15, 2008 at 3:18 PM, Matt McCutchen <matt at> wrote:
> On Thu, 2008-05-15 at 09:50 -0400, Aaron Davies wrote:
>> Hi, i have a question about rsyncing a tree which is largely
>> permissioned for read-only access(444/555, etc.). I have a production
>> environment which is mostly kept in r/o to make it harder to screw up,
>> but parts of it are sometimes manually worked on (in emergencies,
>> etc.). I need to maintain a remote mirror of this, and I would like to
>> do it with the same permissions as production, but I've been getting
>> permissions errors whenever rsync tries to delete something from the
>> remote mirror that has been deleted on the master (also when it tries
>> to set the group for some new files). (The rsync is running as the
>> owner of the files.) Is there a way to make rsync aware that it's ok
>> for it to do whatever permission raising is necessary in order to
>> delete files, chgrp them, etc.?
> "Permission raising" for deleting files was added in rsync 3.0.0.  If
> you are using an older version, please upgrade to at least rsync 3.0.0.

ok, i'll look into it

> I don't know why the chgrp is failing; could you post the actual error
> message and "ls -l" output for the affected destination files?

actually i think those really were owned by someone else

(unfortunately this tree is enormous and takes half an hour just to
index, before any data actually starts moving, or i'd know if i've
fixed that issue)

>> Alternatively, if I chmod -R u+w the
>> remote mirror, will rsync change the permissions back to match prod
>> next time i sync?
> Yes, rsync will change the permissions back.  That should work around
> the deletion problem.

and then it will need to be done again before the next rsync....
- Hide quoted text -
Aaron Davies
aaron.davies at

More information about the rsync mailing list