What to do if crontab reports BAD FILE MODE error in Linux
The purpose of this article is to share with you what to do about crontab reporting BAD FILE MODE errors in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Recently, we encountered a problem. After the server went online, the crontab failed to execute automatically. Check the log below and find the problem:
Apr 16 11:26:01 jb51.net crond [28354]: (* system*) BAD FILE MODE (/ etc/cron.d/flushhost)
Apr 16 11:26:01 jb51.net crond [28354]: (root) BAD FILE MODE (cron/root)
Check the other files in the / etc/cron.d/ directory and find that the attribute of flushhost is 755 and the other is 644, so change this script attribute to 644, and the problem is solved.
In addition, the install.sh script of the mysql installation package is modified at the same time. After the new service is installed, the attribute of the flushhost script is modified to 644.
This problem seems to have been encountered only in individual versions of RHEL, but not in all versions.
Thank you for reading! This is the end of the article on "what to do with crontab BAD FILE MODE errors in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!