Force destination files to specific owner/group

Kyle Lanclos lanclos at
Mon Mar 1 15:01:33 MST 2010


I'm working with an old system I set up to copy files from one local
directory to another. I was using rdist for this, but I would prefer
to shift it over to rsync.

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.

If this capability does not exist, would this be a reasonable extension
of the --owner and --group options?



More information about the rsync mailing list