rsync - Management of UIDs and GIDs when reserved on a Remote system

Simon Hobson linux at thehobsons.co.uk
Mon May 18 13:53:01 MDT 2015


Michael <cuscotravelservices at gmail.com> wrote:

> I would like to know how rsync would manage the situation where the UID and
> GID(s), of a file being copied to a Remote system, have been reserved on the
> Remote system. Does rsync search for and allocate the next available IDs?

AFAIK, if you don't specify the "numeric-ids" option, then it will match by user/group name - ie it'll do a numeric to name conversion at the source, lookup the name at the destination, get the numeric value for the destination, and convert. So if user fred is UID 1000 on the source and 1010 on the destination, files owned by 1000 on the source will end up as UID 1010 on the destination.
If there sin't a matching name then AFAIK it'll do no conversion - you may end up with files owned by either a different user or no user at all. With the above, if user fred doesn't exist on the destination, then files will end up owned by UID 1010.


What is fun is copying files on a filesystem from a different system (mounting the virtual disks for a VM on the host) and copying them elsewhere while forgetting the numeric-ids option. You end up with some "interesting" file ownerships !



More information about the rsync mailing list