rsync not preserving permissions

Matt McCutchen matt at mattmccutchen.net
Wed Feb 11 21:16:29 GMT 2009


On Wed, 2009-02-11 at 19:05 +0000, Andy Smith wrote:
>    I am running the following command, it is "pulling" the files  
> across from a read-only configured rsync server via ssh. The command  
> runs as root and I use the -p option to preserve permissions but files  
> with non-root owners are being created/updated as root owned. Can  
> anyone explain whats wrong and if I can do anything to fix this?
> 
> /usr/local/bin/rsync -r -p -e "ssh -l cacti -i  
> /home/cacti/.ssh/id_dsa" sourceserver::cacti /usr/home/cacti

Ownership is separate from permissions.  To preserve user and group
ownership, you need to pass -og .

-- 
Matt



More information about the rsync mailing list