LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-10-2009, 10:50 AM   #1
lapidarynewbie
LQ Newbie
 
Registered: Jun 2009
Posts: 17

Rep: Reputation: 0
Cron Log File Error Message


One of our CentOS 5.3 installations is showing the following (sanitized) error in its cron log:

crond [nnnnnn]: (*system*) BAD FILE MODE (/etc/crontab)

Most/all of the postings I've seen based on a Google search pins that down to a permissions problem on a crontab job and suggests doing a chmod 644; however, the error message usually includes the specific job giving the problem. In our case it doesn't. How should we interpret this error and what do we need to do to fix it.

Many thanks for your help!
 
Old 08-10-2009, 11:39 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What are the perms on the file? Which job does the time-stamp in
the log match?



Cheers,
Tink
 
Old 08-10-2009, 11:48 AM   #3
lapidarynewbie
LQ Newbie
 
Registered: Jun 2009
Posts: 17

Original Poster
Rep: Reputation: 0
That's just it! All the error says is "/etc/crontab" It doesn't give a particular job and the user is *system*. (No individual user accounts have cron jobs.) If I knew what job was running that caused the problem, I go check the permissions on that job and change them appropriately.
 
Old 08-10-2009, 12:22 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
No ... it's complaining about the perms on the crontab file,
not on any entry cron points at.

ls -l /etc/crontab


And as for the job; look at the time-stamp, compare against
all the possible cron jobs on the system. If there are no
individual ones per user, it HAS to be a job in /etc/crontab,
/etc/cron.d (.hourly) (.daily) (.weekly).



Cheers,
Tink
 
Old 08-10-2009, 12:26 PM   #5
lapidarynewbie
LQ Newbie
 
Registered: Jun 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Ah ha! Blind I am (to mimic that sage philospher Yoda). Okay, yes, the permissions are basically wide open. What permissions do you suggest? Will chmod 644 -rw-r--r-- work?
 
Old 08-10-2009, 01:04 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
'man 5 crontab' yields "In this version of cron , /etc/crontab must not be writable by any user other than root.", 'rpm -qf /etc/crontab --qf='%{name}\n' yields "crontabs", 'rpm -q crontabs --dump | awk '/\/etc\/crontab/ {print $5}'' yields 0100644 (so 'rpm --setperms crontabs' should do the same)... is your answer.
 
Old 08-13-2009, 12:35 PM   #7
lapidarynewbie
LQ Newbie
 
Registered: Jun 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Forgot how, but we got this worked out. Part of the problem was how the cron jobs were moved over from the old RHEL 5.x installation. Permission. We got it worked out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron job won't redirect to log file holunde Linux - Software 3 06-28-2007 02:05 PM
Strange Repeating Error message in /var/log/message lucktsm Linux - Security 2 10-27-2006 08:29 AM
Sendmail Log unknown relay address (cron message) leventis Linux - Security 2 05-31-2006 02:23 PM
cron 'test' message in my /var/log/messages file visaris Linux - Newbie 1 12-13-2004 04:03 PM
Cron - not creating log file t3___ Linux - Newbie 3 02-26-2004 06:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration