crond BAD FILE MODE 解决办法

给piwik 设置好cron job 以后,过了一晚上竟然发现cronjob 没有执行,一看log,出现下面的错误:

[root@ga log]# cat cron |grep piwik
Sep 14 08:43:01 ga crond[2754]: (root) BAD FILE MODE (/etc/cron.d/piwik)
Sep 14 14:40:01 ga crond[2754]: (root) BAD FILE MODE (/etc/cron.d/piwik)
Sep 15 00:29:01 ga crond[2754]: (root) BAD FILE MODE (/etc/cron.d/piwik)

google 了一下才发现原来是我自作多情的把piwik这个文件改成了755.。而crond 不喜欢可写文件。。因此只要把这个文件的权限改为644 即可

chmod 644 piwik

就解决了问题

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.