running amazon ami (similar to centos.)

this is what I found on cron file under /var/log :

Sep  4 15:32:01 mike crond[2289]: (root) BAD FILE MODE (/etc/cron.d/mytasks)

and this is my file mytasks its under the folder cron.d

#hourly query for social share data
1  1-23  *  *  *  wget -q http://localhost/sharecounter.php?period=hourly -O /dev/null 2      >&1 > /dev/null

#daily query for social share data
1  0  * *   1-6  wget -q http://localhost/sharecounter.php?period=daily -O /dev/null         2>&1 > /dev/null

any ideas on what is wrong ?


As the message told you, the permissions of the file are wrong. You have probably made it group or world writable; if this is the case, it is a security risk and crond will refuse to run it.

  • perfect thanks Michael. I changed the permission to 0777 it was 0644 – cppit Sep 4 '14 at 15:44
  • Right, once you fix that then it should run again. – Michael Hampton Sep 4 '14 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.