setgid on directories

Wayne Davison wayned at samba.org
Sat Mar 20 23:30:45 GMT 2004


On Wed, Mar 17, 2004 at 10:41:04AM -0500, Jim Ogilvie wrote:
> I made the following changes to make rsync set the group id bit on new
> directories.

There's a patch in the "patches" subdir of the source that adds a
--chmod option to rsync.  I just improved it a bit so that you can
specify a mode modification that affects just directories (or just
files) instead of all files.  If you want to try it out, check out the
CVS version and apply the very latest chmod-option.diff patch before you
build it.

Using this patch, you would accomplish the setting of the sgid bit on
all directories in this way:

    --chmod Dg+s

The 'D' specifies that the g+s only applies to directories.

..wayne..


More information about the rsync mailing list