1

my os is ubuntu: 16.0.4 PHP 7.2 Apache 2

i install cronjob on this os

error:

cron[30673]: (CRON) INFO (pidfile fd = 3)
cron[30673]: (root) INSECURE MODE (mode 0600 expected) (crontabs/root)
cron[30673]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
2
  • 1
    How did you "install cronjob on this os"? What command did you use?
    – PerlDuck
    Oct 21, 2018 at 16:50
  • 1
    with this command: apt-get install cron Oct 21, 2018 at 17:52

3 Answers 3

1

It sounds like cron has the wrong permission and is owned by another user.

Fixing this is simple, run this command to change the ownership to cron.

sudo chmod 600 /etc/crontab

Then this to restart cron

sudo service cron restart

1
  • i run this command and check status, but see all error on first post , NOT FIX (cron[30673]: (CRON) INFO (pidfile fd = 3) cron[30673]: (root) INSECURE MODE (mode 0600 expected) (crontabs/root) cron[30673]: (CRON) INFO (Skipping @reboot jobs -- not system startup) Oct 21, 2018 at 23:06
1

Apparently someone fiddled around with the permissions of user root's crontab. For security reasons that file must have permissions 600 so that only root and the file's owner can read the file.

Go to /var/spool/cron/crontabs and issue:

root@myhost:/var/spool/cron/crontabs# ls -l
total 4
-rw------- 1 pduck crontab 2551 Aug 22 11:53 pduck
-rw------- 1 root  crontab 1476 May 16 17:11 root

The output must be similar to the one shown above. If not, fix the permissions:

sudo chmod 0600 /var/spool/cron/crontabs/*
0

this error for directory

/var/spool/cron/crontabs/root

root is a file

run this command:

sudo chmod 600 /var/spool/cron/crontabs

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.