My cron suddenly stopped working. Output of ps -A | grep cron:

3149 ? 00:00:00 cron

I have no idea how to interpret that. The only thing I can think of that I did wrong was I chmod 777 my cron files (so I could edit them as non-root)....does that matter (if so, how do I change it back to where it is by default)?


UPDATE: Here is the full cron file:

DO NOT EDIT THIS FILE - edit the master and reinstall.

(/tmp/crontab.XXXXDzXgEa installed on Sat Feb 19 08:24:00 2011)

(Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)


*/1 * * * 1-5 /usr/bin/perl /myscripts/master.pl 2>&1

  • what do you try to run? print the line from your crontab file. – René Höhle Mar 31 '11 at 14:07

I would highly suggest that you chmod your cron files back to the defaults (which is 600 for all files, user and group root for the root crontab, and the owner of the file and private group for all others). For example, my root crontab (on CentOS) owned by user root and group root, and my personal crontab file is user malcolm and group malcolm.

I'm not entirely sure if cron checks the permissions (I hope it does), but leaving this open is really not good - it would allow anyone who got access to your system in any way to run processes as other users, and even root.

If you need to be able to allow other users to edit the root crontab, I suggest you use sudo to grant that access, and only grant it to trusted users.

  • I changed it to 600 but cron is still not executing – Brent Mar 31 '11 at 14:19
  • 1
    Try restarting the crond service. Not sure what OS you're using, but it should be something like "/etc/init.d/crond restart" – malcolmpdx Mar 31 '11 at 14:27

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.