/var/spool/cron query

furquan

Well-Known Member
Jul 27, 2002
473
4
168
Hello Everyone,

I was checking through my server and happen to review my cron folder under "/var/spool/cron"

Here i can see most of the cron jobs of the users owned by root....But few of them are owned by the users themselves .....

Is this ok, or some kind of security issue ?

Please assist !

Thank you for your time.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
Hello,

Cron jobs run based on the type of shell access granted to the account. You will notice the following line in the crontab file for the user when it's assigned "No Shell" or "Jailed Shell" access:

SHELL="/usr/local/cpanel/bin/jailshell"

When the account is assigned normal shell access, you will see this line:

SHELL="/bin/bash"

The ownership of the crontab files will change depending on which user last edited the it. For instance, if you edit the cron jobs as a user via cPanel, ownership will change to the username. If you update "Shell Access" for the account from WHM, it goes back to root.

Thank you.
 

furquan

Well-Known Member
Jul 27, 2002
473
4
168
Thank you for your revert Michael.

I am no more in the office, shall have it checked tomorrow and will revert back accordingly.

Thank you