Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Mar 2009 11:13:36 -0400
From:      FreeBSD <freebsd@optiksecurite.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Rsync always preserve owner/group
Message-ID:  <49BFBE20.5030206@optiksecurite.com>

Next in thread | Raw E-Mail | Index | Archive | Help
Hi list!

I'm in the process of creating an automated update system based on SVN 
and rsync. I 'svn update' every night and then rsync the updated files 
from the working copy of SVN to the right folders. The problem I have is 
that when I rsync the files, the destination owner/group is set with the 
owner/group from the source file (the file from the SVN with a wrong 
owner/group). I don't want to modify the destination file owner/group 
but only update it's content. I'm not using any option with the rsync 
command. I also observed that the permissions are not changed in the 
transfer, which is a normal behaviour and perfect in my situation.

Example:

ll /usr/local/etc/scripts/
-rwxrwxrwx   1 psm   psm    2754 Mar 17 10:51 wakeup.sh

And the details of the source file:
ll /root/update/scripts/
-rwxr-xr-x   1 root  wheel  2754 Mar 13 11:37 wakeup.sh

Execution of the rsync command:
rsync /root/update/scripts/wakeup.sh /usr/local/etc/scripts/

ll /usr/local/etc/scripts/
-rwxrwxrwx   1 root  wheel  2754 Mar 17 10:59 wakeup.sh

I also tried to explicitly disable preserve group with --no-g but got 
the same result.

What am I doing wrong?

Thanks a lot for your help!

Martin





Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?49BFBE20.5030206>