cron error when running script?
I have a script that runs fine from the command line - no errors whatsoever. Here's the script contents:
su - devin --command="rsync -ae ssh db1:/appFiles/logos /appFiles"
chown 0 /appFiles/logos/*
That's it. Now, I have cron set to run this script every ten minutes. here's the contents of
# update logos
*/10 * * * * root /usr/local/bin/rsync-logos 2>&1 > /dev/null
Now, every 10 minutes, the system emails me an email saying:
su: incorrect password
I don't understand the error. The script is being run by root. How can there be a password
error when root is using "su" to switch to one of the system's user accounts?