[K12OSN] Simple RSYNC question

Bill Bardon bill.bardon at gmail.com
Thu Oct 6 17:01:51 UTC 2005


On Thursday, Oct 06 Rich McCue wrote:
> I'm sure I'm just missing a setting or something, but when I rsync
> data from one server to another all the files on the destination
> server are owned by the user that ran rsync.

This normally what you would want, except in the special case of root. 
If user Bill rsyncs from one machine to another, the files on the target
machine should be owned by Bill.
 
> For example I have a server with a backup tape attached to it, and I
> run rsync from that machine to two other servers to get their data to
> the backup server. This works great, except for the file ownership
> thing... everything is owned by root after it gets to the backup
> server.

For backups, you run rsync as root and connect to the source as root, so
all the files are owned by root by default.

Run rsync with the -a parameter to turn on all the archive options, and
then file ownerships will be preserved.  Only root can use -a (or -o)
successfully, as only the root user has access to set file permissions
system-wide.


-- 
Bill Bardon
COMPUTASSIST
Omaha, Nebraska
http://www.computassist.com




More information about the K12OSN mailing list