Permission problem with rsync in daemon mode

Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco) jonachen at
Wed Dec 28 17:54:35 GMT 2005


Thanks for clearing some things up.  Still I want 'netegrity' dir
ownership/permission to be the same but not the 'test' dir
ownership/permission to be changed.  Is it possible without the
'--archive' switches?

> -----Original Message-----
> From: Matt McCutchen [mailto:hashproduct at] 
> Sent: Wednesday, December 28, 2005 9:49 AM
> To: Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco)
> Cc: rsync at
> Subject: Re: Permission problem with rsync in daemon mode
> On Wed, 2005-12-28 at 09:21 -0800, Jonathan Chen -X wrote:
> > sudo rsync --archive --compress -vv --sparse --progress -e ssh 
> > jon at linuxhost::netegrity /users/jon/test/
> > 
> > The /users/jon/test/ is owned by jon:jon while the 
> "netegrity" dir on
> > the rsync server has root:root ownership.   So when I try 
> execute the
> > above command, I get the correct ownership for netegrity, 
> but somehow 
> > the "test" directory ownership changes(maybe access 
> permission changed
> > too?) to root:root instead of jon:jon.   I don't know why 
> that happens.
> > If I execute the command without "sudo" all ownership goes 
> to jon:jon
> rsync is copying the server's netegrity directory onto your 
> test directory, and you told rsync to preserve ownership 
> (--archive), so it sets the ownership of test to match 
> netegrity, i.e. root:root.  (When rsync lacks the privileges 
> to give test to root:root, it simply skips that step without 
> complaining; some consider this behavior wrong.)
> If you don't want to preserve ownership at all, use -rltpD 
> instead of --archive, which means -rltpogD.
> Alternatively, use a wildcard to copy only the files inside 
> netegrity but not netegrity itself, in which case no 
> attributes of test will be changed to match netegrity:
> 	rsync <...> jon at linuxhost::netegrity/* /users/jon/test/
> --
> Matt McCutchen, ``hashproduct''
> hashproduct at --

More information about the rsync mailing list