Hi, 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 Rsync version is 3.0.4 on FreeBSD thanks, Andy. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Andy Smith wrote:> Hi, > > 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?Do the same userids exist at both ends? Try --numeric-ids as an option and see if that helps. nate
Hi Nate, Yes the user id exists on both hosts with the same UID, I also tried the --numeric-ids but this didn't make any difference :S thanks Andy. Quoting nate:> Do the same userids exist at both ends? Try --numeric-ids as > an option and see if that helps.---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
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/cactiOwnership is separate from permissions. To preserve user and group ownership, you need to pass -og . -- Matt
Yep that did the trick! thanks Matt. Quoting Matt:> Ownership is separate from permissions. To preserve user and group > ownership, you need to pass -og .---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.