Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I recently installed CentOS5 on my home file server and also use this machine to "backup" my subversion repos. I created a script to go into each dir and update the repo. This script runs fine when I'm at the CLI. I move the script to /etc/cron.hourly and I get problems:
Code:
Authentication realm: <http://127.0.0.1:80> Jake's Subversion Repository
Password for 'root': Authentication realm: <http://127.0.0.1:80> Jake's Subversi
on Repository
Username: svn: PROPFIND request failed on '/svn'
svn: PROPFIND of '/svn': authorization failed (http://127.0.0.1)
Here's the script itself:
Code:
#!/bin/sh
SVNDIR=/rd0/svn-backup
cd $SVNDIR/Projects
svn update
cd $SVNDIR/Documents
svn update
cd $SVNDIR/QTP
svn update
cd $SVNDIR/JakesProgs
svn update
Now this runs perfectly if I just run it from the CLI (./svn-backup.sh). I've already chmod'ed it to +x.
Any ideas?
That didn't work either. I ended up putting the script in /usr/local/sbin (irrelevant really) and then adding the cron to root's crontab (crontab -e). That pulled my ENV variables with it so all seems well now.
Thanks!
When you run the command or script from the commandline you run it as root account user, and crond runs as another user. If one doesn't want to use the root account crontab then Sudo should work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.