( Elbandi | 2023. 03. 15., sze – 21:22 )

el kene olvasni az rsync mant:

       -o, --owner
              This option causes rsync to set the owner of the destination file to be the same as the source file, but only if the receiving rsync is being run as the  super-user  (see
              also the --super and --fake-super options).  Without this option, the owner of new and/or transferred files are set to the invoking user on the receiving side.

              The  preservation of ownership will associate matching names by default, but may fall back to using the ID number in some circumstances (see also the --numeric-ids option
              for a full discussion).

       -g, --group
              This option causes rsync to set the group of the destination file to be the same as the source file.  If the receiving program is not running as  the  super-user  (or  if
              --no-super  was  specified),  only  groups  that  the  invoking user on the receiving side is a member of will be preserved.  Without this option, the group is set to the
              default group of the invoking user on the receiving side.

              The preservation of group information will associate matching names by default, but may fall back to using the ID number in some circumstances (see also the --numeric-ids
              option for a full discussion).

szoval ha a forras oldalon mancika 123 idvel van, de a cel oldalon 234 id, akkor az rsync jol bellitja a uid/gui-et, hogy tovabbra is mancika legyen az owner.

De ha meg ez se lenne jo, akkor ott van a        --usermap=STRING, --groupmap=STRING opciok.

vegszukseg eseten meg ottvan a find, amivel lehet generalni chown parancsokat:

find -printf "chown %u:%g %p\n" >ezt_kell_a_celhelyen_futtatni.sh