Force destination files to specific owner/group

Matt McCutchen matt at mattmccutchen.net
Sun Mar 7 01:31:17 MST 2010


On Mon, 2010-03-01 at 14:01 -0800, Kyle Lanclos wrote:
> The one thing I'm missing is the trivial ability to force the group
> owernship of the destination files to a specific group. A read through
> the manpage and various searches on the web do not turn up any helpful
> hints in this regard.
> 
> What I would really like is something like:
> 
> rsync --other-options-here --owner=someuser --group=somegroup source/ dest/
> 
> Regardless of the source/ ownership and group, files copied to dest/ are
> created with owner 'someuser' and group 'somegroup'. Similar to the normal
> --owner and --group behavior, this would require --super behavior.
> 
> Presumably, if the inspected files in dest/ had different ownership info,
> they would be updated to have the 'correct' info, same as if someone had
> done a chown -R someuser:somegroup in the destination directory.

See the --usermap and --groupmap options that are in the current
development rsync and available in a patch "usermap.diff" for 3.0.7.

-- 
Matt



More information about the rsync mailing list