The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cron jobs stop working after updates

Discussion in 'General Discussion' started by crshep, Apr 13, 2014.

  1. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
    Why is it every time cpanel upgrades is screws with cron job commands?

    I use WHMCS billing software and every single time cpanel updates my cron jobs stop and when I try to explain to my host the problem it takes them over a week to fix. As of right now cpanel updated on 04-08-2014 according to my logs and my cron jobs hasn't worked yet and my host STILL can't find the problem and get it fixed.

    This has happened the last 4 or 5 times cpanel has updated cron jobs stops working. My host said something to do with jailshell or what ever.
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Re: cron jobs stop workign after updates

    without any error logs not much of anything that anyone here will be able to help with, but 1 week to fix is a bit much.
    been using cpanel for 12+ years never had it stop crons :confused:
     
  3. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
    Re: cron jobs stop workign after updates

    Ok they my server people got it fixed and found WHY this happens with cpanel updates as per what cpanel told them.

    ------------------------------------------------------------------
    "As per cPanel update, they introduced " jailshell" concept in CRON jobs for security purpose. But enabling "jailshell" in shared server environment is not an good idea.

    So we are manually editing CRON jobs and setting attributes for cron files to avoid "jailshell" entries."
    --------------------------------------------------------------------

    Since most people using WHM/Cpanel with a shared environment why would they enable jailshell?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Are you able to elaborate on the specific issue with the cron job you experienced? Was it simply not running automatically? Did your hosting provider review any log files to look for error messages? What was the specific command that was utilized? What version of cPanel is installed on the system?

    Thank you.
     
  5. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
    Sorry I really do not know all the details but they said or at least claimed they contacted cpanel about this the very first time about a year ago or so and since then every time cpanel updates they have to go in and disable "jailshell" so I would think "jailshell" is enabled on all updates. But that is my guess.

    yes is is also correct cron job for (WHMCS) at least just doesn't run. They said viewing all the logs which they sent me shows the cron jobs running correctly so the logs were not any help since we both knew they were not running.

    As to what version humm didn't matter it is what ever version it updates to. As of right now I have WHM 11.42.1 (build 5)
    and looking at the update file or what ever it is called this updated on 4-8-2014 and that was also the last day my cron jobs ran.

    It is fixed now but is a pain every time cpanel updates. It always seems to take a few days to figure out that cpanel updated (Yes I should look first next time) then once we figure out it did then the hosting can correct the problem.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to have your hosting company open a support ticket so we can take a closer look and see what's actually happening. You could post their ticket number here and we could update this thread with the outcome.

    Thank you.
     
  7. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
    They said cpanel was already aware of the problem last. That's all they told me. I more or less told you the problem they told me it was about forcing jailshell doing cron jobs or something like that and most shared hosting (people that use cpanel) have that disabled and when cpanel updates it enables it again and then the shared hosts has to disable it again to get cron jobs to work.

    At least this is how I understood it.

    I guess you would need to find it out if this statement was even true that cpanel told them last year some time.

    "As per cPanel update, they introduced " jailshell" concept in CRON jobs for security purpose" If that is true then that makes sense with jailshell disabled cron jobs not working.

    I do not much about this type of stuff at all. All I know is everytime cpanel does an update my cron jobs stop working and then the hosting says they have to tweak something with cron job to work without jailshell enabled since we have is disabled.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The change is referenced here:

    Jail System Update | cPanel Releases

    Rather than attempting to manually circumvent this change, your hosting provider might be better served by investigating why the cron jobs are actually failing. The fact that a cron job runs under a jailed shell environment does not mean that cron jobs should not function properly. We can assist them with that if they choose to open a support ticket with us.

    Thank you.
     
  9. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
    like I said before I do not understand all of this stuff and the last time they contacted cpanel the fix was to disable jailshell which they did and it should be disabled with a shared server anyway. They also said the last update on 4-8-2014 enabled jailshell again on the vps and when they disabled it cron jobs worked again. Sorry this is all I know.

    This was their exact working.
    ----------------------------

    As per cPanel update, they introduced " jailshell" concept in CRON jobs for security purpose. But enabling "jailshell" in shared server environment is not an good idea.

    So we are manually editing CRON jobs and setting attributes for cron files to avoid "jailshell" entries.
    ------------------------------------------------------
     
    #9 crshep, Apr 16, 2014
    Last edited: Apr 16, 2014
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    That response indicates your hosting provider alters the way cPanel handles cron jobs. Unfortunately, there is not much you can do if your hosting provider is implementing custom modifications. This would need to be addressed with them directly.

    Thank you.
     
  11. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
    So are you saying cpanel NEVER introduced a "jailshell" concept in cron jobs for security reasons?
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I believe you may have misunderstood my last response. I was attempting to convey that your hosting provider changes the default way cron jobs are handled based on my understanding of the response you provided. As mentioned earlier, the change is referenced here:

    Jail System Update | cPanel Releases

    The issue here is that you do not have root access, so we are not going to be able to directly troubleshoot this issue for you. We will be happy to converse with your hosting provider if you have them open a support ticket so we can clarify what exactly is happening.

    Thank you.
     
  13. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
    I do have root access but I pay extra for fully managed servers since I do not under stand most of this stuff that needs done. It is working now but next time cpanel updates and it stops working I can sure contact cpanel.

    I also did read


    Filesystems mounted within virtfs are now mounted nosuid.
    Most Filesystems mounted within virtfs are now mounted read-only on CentOS 6, CloudLinux 6, RHEL 6, or later
    The mail delivery system has been updated to be aware of jailshell and now runs all piped deliveries though jailshell
    Users of mod_ruid2 can now enable “Jailed apache” support which will chroot() each virtual host into their virtfs.
    Cron jobs are now run with jailshell.

    so the last line "Cron jobs are NOW run with jailshell" So if we have jailshell disabled wouldn't this make cron jobs stop working? and to make then work again we would either have to enable jailshell which we do not want on a shared server or do what my hosting has to do and "alter the way cPanel handles cron jobs"

    So like I said I do not really know what I'm talking about but if the above is true then everytime cpanel updates the hosting provider has to go back in to cpanel and change it back to where we have it for cron jobs to work since we have jailshell disabled and cpanel is setup for cron jobs to run through jailshell.
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Cron jobs are run in the jailed environment when the account is assigned jailed shell access or no shell access at all.

    Thank you.
     
  15. crshep

    crshep Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    87
    Likes Received:
    2
    Trophy Points:
    8
  16. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The last line states:

    I believe you may not fully understand the nature of this statement. Let's forgot for a moment what type of shell access an account is assigned in "WHM Home » Account Functions » Manage Shell Access". Cron jobs run in a jailed shell environment regardless of whether an account is assigned jailshell access or not granted shell access at all. Thus, the statement in the URL you provided is accurate. If you disable shell access for the account, cron jobs are still ran under a jailed shell environment. If you enable jailed shell access for the account, cron jobs are still ran under a jailed shell environment. Feel free to open a support ticket with us if you want us to troubleshoot the failing cron jobs that occur on your system.

    Thank you.
     
    MaraBlue likes this.
  17. Lor

    Lor Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Ok. I have a directory '/disk2/cache/' outside /home/ with chmod -R 0777

    I can write and read files from any CPanel account to/from the directory,
    but I can't execute unlink command to delete files within the directory,
    because my cron script can't found the directory '/disk2/cache/'

    What I have to do?
     
  18. Lor

    Lor Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Ok. I understand. Now I have to rewrite scripts for 40+ websites because the problem. Thanks.
     
  19. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I'd advise against this type of configuration. Have you considered using an alternative such as suPHP or Mod_Ruid2 to avoid the need for 0777 permissions?

    Thank you.
     
  20. Lor

    Lor Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    First, I not use PHP - Perl only.

    Also I want access from my cron scripts to the disk located outside users accounts. I have the access with 0777 when I run regular(not cron) scripts, but after CPanel update I can't use the disk from cron because jailedshell ...
     
Loading...

Share This Page