Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
Did it ever work? –  deltaray Oct 4 '11 at 14:43
    
I was told that it used to work prior to updates to sudo and rsync. There's another set of systems here which use the same script and cron, they work fine. The only differences I've been able to discern is the versions of rsync and sudo. On the systems which work the version are older. I tried copying the rysnc binary from a working system to a non working system and no change. I'm wary of doing the same with sudo. Thanks for the question. –  Mike Oct 4 '11 at 14:51
    
Is /etc/ mounted to something other than ext* ? There are some FS that can't handle time "properly". Does the script run properly from shell? –  user Oct 4 '11 at 15:14
    
The FS seems to be local, and the script fails when I run from the shell as the user which is set to run the script. Thanks for the question. –  Mike Oct 4 '11 at 15:17
    
The updates to sudo and rsync, were they done within the same RHEL channel? Functionality shouldn't change within a major version of RHEL, so I kinda doubt the issue is there. But if you installed some unsupported sudo or rsync that could be the issue. Although I doubt that's causing this issue. –  deltaray Oct 4 '11 at 15:21
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.