incoming chmod on daemon fails on subdirectories

Matt McCutchen hashproduct+rsync at gmail.com
Mon Sep 25 21:10:59 GMT 2006


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