rsync download command from http://crux.nu/portdb/
vs at kp4.ru
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
http://crux.nu/portdb/ as the super-user. For example,
rsync -aqz crux.nu::ports/crux-2.6/opt/git/ 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 crux.nu::ports/crux-2.6/opt/git/ git
Yes, it looks cumbersome, but at least it does exactly what user
Vitaly Sinilin <vs at kp4.ru>
More information about the CRUX