change UID+GID on target system?
oub at mat.ucm.es
Mon Jun 18 06:36:16 MDT 2012
I googled about my problem and found some hints but not a
On laptop 1, I am user oub (uid=1000) and in the sudo list.
I connect an USB drive (jfs file system), its get automatically
mounted with the correct uid.
I copy files with rsync from laptop 1 to the USB.
( rsync -auvz --progress /home/oub/files /media/usb )
On laptop 2, I am user oub (uid=1002) and in the sudo list.
Now when I connect the USB (jfs file system) its get automatically
mounted however as uid=1000 which is another user on Laptop2.
There is a patch for mount which allows to set the UID and
GID of the usb drive, but this patch is not standard.
So the only solution I see is to use chmod -R (and chgrp -R)
on the target system and then run rsync to copy from the USB
And later to the inverse operation.
Is there any possibility that rsync, running with sudo,
changes the files it copies to the UID +GIDof the target system?
Thanks and regards
More information about the rsync