Force destination files to specific owner/group

Bill Campbell rsync at
Mon Mar 1 16:27:55 MST 2010

On Mon, Mar 01, 2010, Kyle Lanclos wrote:
>I'm working with an old system I set up to copy files from one local
>directory to another. I was using rdist for this, but I would prefer
>to shift it over to rsync.
>The one thing I'm missing is the trivial ability to force the group
>owernship of the destination files to a specific group. A read through
>the manpage and various searches on the web do not turn up any helpful
>hints in this regard.

If you connect to an rsync daemon you can specify the user and
group on a per-module basis with something like this in your
rsyncd.conf file:

	uid = bill
	group = staff
	read only = false
	path = /home/bill
	hosts allow =
	hosts deny *

The appropriate rsync command would be something like

rsync -aHrx /home/bill/ destsys::bills_home/

INTERNET:   bill at  Bill Campbell; Celestial Software LLC
URL:  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

Financial panics, if left alone, rarely cause much damage to the real
economy, output, employment or production. Asset values fall sharply and
wipe out those who borrowed and lent too much, thereby redistributing
wealth from the foolish to the prudent.  -- Arthur Laffer

More information about the rsync mailing list