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

by on March 14, 2010 · 4 comments· LAST UPDATED March 15, 2010

in

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.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 4 comments… read them below or add one }

1 acidsolution March 17, 2010 at 11:12 am

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

2 af October 22, 2012 at 4:44 pm

Hi,
my files was with rw permission, after changed the file to r only,
cron, start worked perfectly
Cheers for that, this has fixed my problem ;)

Antonio Feijao

Reply

3 pan June 13, 2013 at 7:27 am

Thanks for the post. This solution worked well for me :D

Reply

4 naveen December 9, 2014 at 10:22 am

chmod 0644 /etc/crontab will also work.

Reply

Leave a Comment

Tagged as: , , , , , , , , , ,

Previous Faq:

Next Faq: