crontab异常,无法自动运行

近期碰到有服务器上线后,crontab都发生异常没有自动执行,查看了下日志,发现问题:

Apr 16 11:26:01 imysql.cn crond[28354]: (*system*) BAD FILE MODE (/etc/cron.d/flushhost)
Apr 16 11:26:01 imysql.cn crond[28354]: (root) BAD FILE MODE (cron/root)

检查了下 /etc/cron.d/ 目录下的其他文件,发现 flushhost 的属性是 755,其他的则是 644,于是将这个脚本属性也改成644,问题解决。

另外,/var/spool/cron 目录下的文件也应该注意其设置的属性。

回复

此内容将保密,不会被其他人看见。
  • 允许的 HTML 标签: <a> <b> <address> <blockquote> <br> <caption> <center> <code> <dd> <del> <div> <dl> <dt> <em> <font> <h2> <h3> <h4> <h5> <h6> <hr> <i> <img> <li> <ol> <p> <pre> <span> <strong> <sub> <sup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <u> <ul> <tr>
  • 行和段被自动切分。
  • 网页地址和电子邮件地址将会被自动转换为链接。

更多格式化选项信息

随机验证
本功能用于防止垃圾信息
在输入框中输入图片上的字符(注意大小写)