error : WRONG FILE OWNER (/var/spool/cron/$USER)

Dec 27, 2019
10
0
1
doubai
cPanel Access Level
Root Administrator
I defined a new job in cronjobs menu (in cpanel) to run a php file each 5 minutes, but it doesn't run after 5 minutes.

PHP:
*/5  * * *  /usr/local/bin/php /home/$USER/public_html/custom_script

whae i check CRON logs it shows bellow error :

PHP:
crond[2095080]: ($USER) WRONG FILE OWNER (/var/spool/cron/$USER)


when i check above mentioned path , i can see that file owner is that user:

PHP:
# ls -la /var/spool/cron/$USER

-rw-------   1 $USER   $USER    131 Jan 29 21:48 $USER

why defined CRON file doesnot run?
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,628
363
cPanel Access Level
Root Administrator
What about /var/spool/cron/ itself? That should look similar to this:

Code:
drwx------. 2 root root 4096 Jan 13 11:52 /var/spool/cron/
You can always keep working up the file path chain too, checking the ownership of /var and /var/spool, which should be the following:

Code:
drwxr-xr-x. 11 root root 4096 Oct  7 16:40 /var/spool/

drwxr-xr-x. 22 root root 4096 Jan 28 13:00 /var
 
  • Like
Reactions: aria_opensource

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,628
363
cPanel Access Level
Root Administrator
If you have root access to the server you're always welcome to submit a ticket to our team so we can check things out directly on the system experiencing the issue. If you do that, please post the ticket number here so I can follow along and keep this thread updated with our findings.
 
  • Like
Reactions: aria_opensource