incoming chmod on daemon fails on subdirectories

Bill Uhl bill at
Tue Sep 26 11:18:33 GMT 2006

Back in rsync 2.6.2 and before, I used a chmod and ldap patch by Stefan 
Nehlsen. The chmod part worked well for me then. As rsync moved on, the 
patch no longer worked and my c skills were too limited to figure out 
how to update it. I am wondering about two things.

First. Is the current chmod code any relation to Stefan's? Is it worth 
comparing to his?

Second. Are you aware of any ldap patches. I used to find them very useful.


Matt McCutchen wrote:

> When --perms is off, an incoming chmod of "Dg-s" does not prevent
> directories from inheriting setgid bits; it probably should.  Incoming
> chmod currently takes effect in dest_mode, which is too soon for it to
> affect the directory setgid check in set_file_attrs.  (It's ironic
> that I didn't notice this sooner, given that the directory setgid
> check is only a few lines below dest_mode in rsync.c!)
> To avoid further bugs of this nature, I propose that incoming chmod
> should take effect right before the actual call to chmod in
> set_file_attrs, as rsyncd_perm once did.
> Matt

More information about the rsync mailing list