Results 1 to 6 of 6
Thread: Root Crons not workin...
-
04-28-2004, 09:23 PM #1Web Hosting Evangelist
- Join Date
- Nov 2003
- Posts
- 518
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.
-
04-28-2004, 11:40 PM #2Web Hosting Evangelist
- Join Date
- Nov 2003
- Posts
- 518
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.
-
04-29-2004, 02:21 PM #3Web Hosting Evangelist
- Join Date
- Nov 2003
- Posts
- 518
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!
-
04-29-2004, 03:21 PM #4Aspiring Evangelist
- Join Date
- Mar 2004
- Location
- Chicago, IL
- Posts
- 390
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.Last edited by inapmike; 04-29-2004 at 03:25 PM.
-
04-29-2004, 04:10 PM #5Web Hosting Evangelist
- Join Date
- Nov 2003
- Posts
- 518
hmm thanks - and good point!
*gives that a shot*
-
04-29-2004, 04:16 PM #6Web Hosting Evangelist
- Join Date
- Nov 2003
- Posts
- 518
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...