CRON Script not working right.
Don O'Neil
don at lizardhill.com
Wed Jan 17 04:05:58 UTC 2007
Anybody have any clues why a shell script run from root's CRON would act
differently then when run directly from the command line?
Specifically, I have a script that looks for files on a NFS mount point and
copies them across and changes the ownership/perms.
Here's the gist of the script:
#!/bin/sh
TDIR=`date +%m%d%y%s`
mkdir /tmp/$TDIR
mv /source/* /tmp/$TDIR/
chown user:group /tmp/$TDIR/*
chmod 660 /tmp/$TDIR/*
mv /tmp/$TDIR/* /destination/
When run from roots CRON it does everything but the chmod correctly, which
is strange. When I run it from the command line as root it works fine as
expected.
I'm running 6.1-STABLE-200608.
Any clues?
More information about the freebsd-questions
mailing list