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.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop















{ 2 comments… read them below or add one }
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.
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