I've inherited two red hat 5 systems which are to be synchronized via an rsync script which runs as a cronjob. This is not happening and I've been tasked with finding out why.
The cronjob(currently commented out):
#15,45 * * * * /usr/bin/sudo /usr/local/lib/repl/netreg-repl.sh remotesystemhere
Script contents:
if [ "x$1" = "x" ]; then
echo "Usage: $0 desthost" 1>&2
exit 1;
fi
DEST=$1
$ECHO /usr/bin/rsync -aRve "ssh -i /home/repl/.ssh/id_rsa" \
--delete `/bin/cat /usr/local/etc/repl/filelist.txt` repl@"$DEST":/
Errors received:
sending incremental file list
/etc/
rsync: failed to set times on "/etc": Operation not permitted (1)
/etc/httpd/
rsync: failed to set times on "/etc/httpd": Operation not permitted (1)
/etc/httpd/MIKETEST
/etc/httpd/REPLTEST
/etc/httpd/ROOTTEST
/etc/httpd/conf.d/
rsync: failed to set times on "/etc/httpd/conf.d": Operation not permitted (1)
/etc/httpd/conf/
rsync: failed to set times on "/etc/httpd/conf": Operation not permitted (1)
rsync: mkstemp "/etc/httpd/.MIKETEST.wVy5bm" failed: Permission denied (13)
rsync: mkstemp "/etc/httpd/.REPLTEST.8no8zE" failed: Permission denied (13)
rsync: mkstemp "/etc/httpd/.ROOTTEST.rMzbYW" failed: Permission denied (13)
sent 725 bytes received 86 bytes 1622.00 bytes/sec
total size is 119555 speedup is 147.42
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]
The user which runs the script is in sudoers:
repl ALL=(ALL) ALL
Defaults:repl !authenticate
I've tried adding -O to rsync, but it script still dies.
I am at my wits end and would appreciate any assistance!