change UID+GID on target system?

Voelker, Bernhard bernhard.voelker at siemens-enterprise.com
Mon Jun 18 09:25:30 MDT 2012


Uwe Brauer wrote:

> Situation:
> 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 )
> 
> However:
> 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.

Why not write the date on the jfs drive as uid=1002 on laptop1?

Unfortunately, ssh doesn't allow numerical user ids AFAIK, but
if you have a second user, e.g. "u1002", then you could do:

  rsync -avx /path/to/src u1002 at localhost:/path/to/usb/dest

Have a nice day,
Berny


More information about the rsync mailing list