CRON job marked as UNSAFE and not run](

Please see the screenshot above; I had a working CRON job set up and working but needed to add another series of commands to it (it basically RSYNCs a bunch of folders from one place to another across the network).

After adding, saving and restarting the CRON service, I’m now getting the error:-

Aug  7 13:30:02 bgrsvr-y /usr/sbin/cron[23879]: (badger_fruit) CMD (/home/badger_fruit/bin/backup-script)
Aug  7 13:30:02 bgrsvr-y /usr/sbin/cron[23877]: (badger_fruit) UNSAFE (badger_fruit)

Can anyone offer any additional information why this would be marked as such?

Perhaps you don’t own the file or it’s writable by other people.

Hi Ken
Thanks for the suggestion but i’ve “ls -l” and it’s owner and group are correct :frowning:

-rwxr-xr-x 1 badger_fruit users 1234 Aug 7 10:37 backup-script

I can not read the screen shot (looks like terminal output, so cut and paste in the post would have worked perfect).

Stupid question: why do you restart cron? After changing the crontab with

crontab -e

nothing is needed.

I didn’t touch the cronjob, i amended the script the cronjob calls. Didn’t realise I didn’t need to restart the service, just did it!

Anyway, problem solved - the log file that the called script runs had had it’s permissions gnarled up somehow; I discovered this when I tried to run the script manually. Changed/reset the permissions and now it’s running fine again!

Hoorah for me :wink:

Hm, hm …