-
Root Crons not workin...
I have this cron:
*/15 * * * * chmod 644 /var/log/exim_mainlog /dev/null
in the
/etc/crontab
But it doesn't work. I did try a few variations that I don't recall offhand. Anyone know why it might not work?
It's for the Mail-Watch system. Whenever there's a log rotate or /scripts/mailperm is run the chmod is set back to its default and Mail-Watch can't read it.
Any help is greatly appreciated, thank you.
-
got that working - but now cpanel erases all the crons on the server located in
/home/user/
but the ones in
/var/spool/cron/
are still there trying to run.
-
So in short, I'm retarded.
I edited the /etc/crontab manually via pico -w which I noe hear is a bad thing. *eep!*
So anyhow - it screwed my /dev/null so that other users can't write to it. Thus breaking their crons that use /dev/null
When I do this - I get....
ls -l /dev/null
crw-r--r-- 1 root root 1, 3 Sep 15 2003 /dev/null
Could someone please let me know if that's the problem?
Thank you much!
-
Everyone should have write access to /dev/null.
crw-rw-rw- 1 root root 1, 3 Apr 11 2002 /dev/null
Try "chmod 666 /dev/null".
Then fix this line:
chmod 644 /var/log/exim_mainlog /dev/null
shoud be
chmod 644 /var/log/exim_mainlog > /dev/null
Although chmod won't output any info anyway unless it fails, so you may want to drop the /dev/null entirely.
-
hmm thanks - and good point!
*gives that a shot*
-
And it worked.
Thank you very much BigGorilla! I should have realised that but I just don't know much about crons and used others as examples...