rsync download command from http://crux.nu/portdb/
Hi, 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 expects. -- Vitaly Sinilin <vs@kp4.ru>
On Thu, 2010-01-07 at 21:32 +0300, Vitaly Sinilin wrote:
Hi,
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 expects.
Has anyone had a chance to test this? My CRUX box is down due to hardware failure, so I haven't had much CRUX time lately.
On Wed, Feb 03, 2010 at 12:09:59AM +0000, Lucas Hazel wrote:
On Thu, 2010-01-07 at 21:32 +0300, Vitaly Sinilin wrote:
Hi,
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 expects.
Has anyone had a chance to test this?
Yes, can confirm the behaviour the OP has seen. I'd suggest to use the same options we use in our rsync ports driver, -rcz. greetings Juergen -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
participants (3)
-
Juergen Daubert
-
Lucas Hazel
-
Vitaly Sinilin