rsync
rsync copied to clipboard
--usermap and --chown option flags are not working as intended.
currently on rsync 3.2.3.
When running a command with options to change the destination owner and group, it doesn't work, and assigns the permissions and group of the user who issues the command.
e.g.
When running as root, do:
sync -ruv --ignore-existing --usermap=*:testuser --groupmap=*:testuser /path/to/source/ /path/to/destination/
or
rsync -ruv --ignore-existing --chown=testuser:testuser /path/to/source/ /path/to/destination/
The files in the destination are created with root:root for owner and group. Likewise, if I ran the command with the account testuser3, the permissions would be testuser3:testuser3, instead of the specified testuser:testuser
Actually, now I'm wondering if the issue might be a regression related to this: https://github.com/WayneD/rsync/issues/242
Sure enough, when I do the following it works exactly as expected:
rsync -ruv --ignore-existing --chown=testuser:testuser --owner --group /path/to/source/ /path/to/destination/
The latest rsync implies --owner & --group when --chown is used.