What should I do if the Linux crontab has a BAD FILE MODE error?

  

The crontab command is mainly used to set the instructions that are executed periodically, but sometimes the crontab exception occurs, there is no automatic execution of the instruction, and the BAD FILE MODE error message appears. How to solve this situation? Let's learn together with Xiaobian.

recently encountered a problem on the line to the server, crontab are no exception occurs automatically, looked under the log and found the problem:

code is as follows:

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 other files in the /etc/cron.d/directory and find that the property of flushhost is 755, and the rest is 644. So the script property is also changed to 644, the problem is solved.

In addition, the install.sh script of the mysql installation package has also been modified. After the new service is installed, the property of the flushhost script is modified to 644.

This problem seems to have only been encountered in individual versions of RHEL, not all versions.

The above is the Linux crontab error BAD FILE MODE solution introduced, if your crontab is not automatically executed, and the error message appears in the log, you can use this method to solve.

Copyright © Windows knowledge All Rights Reserved