[TriLUG] Rsync
Stephen Hoffman
srhoffman at bellsouth.net
Thu Jul 29 13:44:09 EDT 2004
Probably been asked a hundred times before, but I'm having trouble with
rsync.
I want to sync two webserver directories on two different machines, but
the permissions are driving me up a wall. I've googled, and rtfm to no
avail.
I run the following command:
rsync -avre ssh /path/to/local/dir user at host.com:/path/to/remote/dir
this goes through the process of syncing just fine, the issue is that the
webserver on local machine runs as apache so user:group are apache:apache,
the user:group on the remote machine are user:nobody. What is happening
is when I rsync the two then all the uid's:gid's on the remote machine
become apache:apache and thus apache can't access the directories.
I've added the -o and -g, but unless I'm reading wrong they do what is
already happening and transferring the owner and group to the new machine.
I'm working around this by ssh'ing in and chown'ing everything at the end
of the script, but I would think that this should be a native capability
of rsync and wouldn't need to be scripted.
TIA,
Steve
More information about the TriLUG
mailing list