change UID+GID on target system?
Uwe Brauer
oub at mat.ucm.es
Tue Jun 19 06:45:48 MDT 2012
>> On Tue, 19 Jun 2012 08:18:23 +0000, "Voelker, Bernhard"
>> <bernhard.voelker at siemens-enterprise.com> wrote:
> Uwe Brauer wrote (June 18, 2012 6:21 PM)
>>
>> rsync -avx /path/to/src oub at localhost:/path/to/usb/dest
>>
>> Because otherwise the system does not recognise the passwd
>> of u1002
> I don't understand. You said your user "oub" has id
> 1000 on the source laptop, and id 1002 on the
> destination laptop. The idea therefore was to have a
> second user with id 1002 on the source laptop - I named
> it u1002, and use rsync via ssh to the localhost to get
> the files on the USB drive/stick with id 1002.
Oh I see misunderstanding then. So what you propose is
basically a chown of the directory in question?
I tried the following
Laptop1 to disk: disk is mounted with uid=1000
rysnc -auvzx /home/oub/dir /media/disk/oub (id=1000)
from disk to Laptop2 disk is mounted with uid=1000 but user
is uid 1002
rsync -auvzv /media/disk/oub/dir oub at localhost:/home/oub (id=1002)
Files get copied without problems, having now id=1002 and
username oub.
Edit hte files and Work... work
try to copy back to the disk
rsync -auvzv /home/oub/dir oub at localhost:/media/disk/oub
Now it fails, even as
sudo rsync -auvzv /home/oub/dir oub at localhost:/media/disk/oub
So it seems the only possibility is to have the same uid on
both machines.
Regards
Uwe Brauer
Ps I had to add
sshd: localhost 127.0.0.1 : allow
Otherwise ssh does not work.
More information about the rsync
mailing list