I'm using rsync to backup files from host A to host B. host A is running Solaris 2.6 with rsync 2.3.1 host B is running Solaris 7 with rsync 2.5.5 host A runs as root and syncs to host B through OpenSSH 3.4p1 to a non-root user on host B. If I bring a file back from host B to host A, I find that the original owner has been changed from whatever it was on host A to the non-root user on host B. I've tried rsync with --numeric-ids and -gop (amongst other options) and experimented with some other things, but can't seem to get my files back to host A with the original owner and group. Please help.
On Wed, 30 Oct 2002, Remington I, Scott (S.M.) wrote:> I've tried rsync with --numeric-ids and -gop (amongst other options) > and experimented with some other things, but can't seem to get my > files back to host A with the original owner and group.The receiving side must be run as root in order to set the ownership. The way to deal with this is to run rsync in daemon mode on the receiving side with proper access controls configured, then, if you must have encrypted transport, open up an SSH tunnel from your sender to the non-root user on your receiver, and have that tunnel forward locally to the rsync daemon. At least, that's what I know at this point :) Perhaps someone more guruly will have a better technique :)
Thank you, I'll follow up with your suggestions. And, BTW, I LOVE the term *guruly*. That's a new one for me :-} -----Original Message----- From: Tripp Lilley To: Remington I, Scott (S.M.) Cc: 'rsync@lists.samba.org ' Sent: 10/30/02 9:52 PM Subject: Re: Issues with ownership and group On Wed, 30 Oct 2002, Remington I, Scott (S.M.) wrote:> I've tried rsync with --numeric-ids and -gop (amongst other options) > and experimented with some other things, but can't seem to get my > files back to host A with the original owner and group.The receiving side must be run as root in order to set the ownership. The way to deal with this is to run rsync in daemon mode on the receiving side with proper access controls configured, then, if you must have encrypted transport, open up an SSH tunnel from your sender to the non-root user on your receiver, and have that tunnel forward locally to the rsync daemon. At least, that's what I know at this point :) Perhaps someone more guruly will have a better technique :)