Ok, I am having the most absolute horribly frustrating time setting up a CentOS mirror.
I have initiated an rsync script and cron job however and the script works, however its writing the files with seemingly random owners and groups.
Code:
#!/bin/sh
# please adjust
lock=~/`basename ${0}`.lock
if [ -f ${lock} ]; then
# This ensure script didn't die w/o removing lock
# Ex: power failure
[ -d /proc/`cat ${lock}` ] && exit 0
fi
clean () {
rm -fr ${lock}
}
trap clean 0
rsync -aqHz --delete --delay-updates --exclude '/2*' --exclude '/3*' us-msync.centos.org::CentOS /var/www/centos
I am running the script as root, why is it NOT writing the files as root to my local server?
It is writing the files as mysql:mysql sometimes and jeremyv:nagioscmd othertimes. Any ideas?
I am running CentOS 5.0