Problem
I use a cron job to run a script to backup my files every day at 4:00 AM. It worked well for years. However, when I moved to Ubuntu 10, the cron job stopped working. Error message stated “/bin/sh: 1:/home/sa/backup/backup.script: Permission denied”. The script file ran well if called from command prompt.
Solution
It took more than two weeks for me to try different solutions on the web and tried different version version of Ubuntu without any success.
Below is my script:
01 04 * * * /home/sa/backup/backup.script
The final solution is: insert the command directly into the cron job:
01 04 * * * /bin/sh /home/sa/backup/backup.script