crond: (*system*) BAD FILE MODE Error and Solution

by Vivek Gite on March 14, 2010 · 1 comment

I'm getting this message in my /var/log/cron

Mar 12 09:20:01 server2 crond[1267]: (*system*) BAD FILE MODE (/etc/cron.d/vnstat)

How do I fix this problem under Fedora / CentO / RHEL or any Linux distro?

Run an ls -l on /etc/cron.d/vnstat file and find out the permissions. cron do not like files with world writable file and it is pretty picky about it. All you have to do it set 0644 (rw-r--r) permission i.e. remove world writable file permissions. Type the following command as root user:
# ls -l /etc/cron.d/vnstat
# chmod 0644 /etc/cron.d/vnstat
# ls -l /etc/cron.d/vnstat

This should fix the problem.

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 1 comment… read it below or add one }

1 acidsolution March 17, 2010

This is not the fix.
it doesnot help if your vnstat cron file is being generated every minutes and your umask setting is not 022 .
What if i have umask as 002 and by vnstat file is being written every min by some other process.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 6 + 7 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: