rsync download command from

Vitaly Sinilin vs at
Thu Jan 7 18:32:49 UTC 2010


Recently I noticed several files and directories under /usr/ports
on my CRUX box owned by non-privileged users. Moreover, some of them
were owned by nonexistent users.

It looked strange to me and after some thoughts I found the reason of
that. These directories have been created using download commands from as the super-user. For example,

  rsync -aqz git

The problem is in the -a option of rsync. It includes -u and -g options.
So when the command is being executed as the super-user it preserve
owner and group of the transferred files.

Such behavior doesn't look like the one that user expects, as the
source and target hosts have thier own user accounts. So from my point
of view the following command is more appropriate:

  rsync -rlptDqz git

Yes, it looks cumbersome, but at least it does exactly what user

Vitaly Sinilin <vs at>

More information about the CRUX mailing list