Skip to main content

cron jobs stop working after updates

Comments

20 comments

  • dalem
    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:
    0
  • crshep
    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?
    0
  • cPanelMichael
    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.
    0
  • crshep
    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.
    0
  • cPanelMichael
    [quote="crshep, post: 1620991">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..
    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.
    0
  • crshep
    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.
    0
  • cPanelMichael
    The change is referenced here: [url=http://releases.cpanel.net/releases/11-38/jail-system-update/]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.
    0
  • crshep
    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. ------------------------------------------------------
    0
  • cPanelMichael
    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.
    0
  • crshep
    So are you saying cpanel NEVER introduced a "jailshell" concept in cron jobs for security reasons?
    0
  • cPanelMichael
    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.
    0
  • crshep
    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.
    0
  • cPanelMichael
    [quote="crshep, post: 1625191">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"
    Cron jobs are run in the jailed environment when the account is assigned jailed shell access or no shell access at all. Thank you.
    0
  • crshep
    So your saying cron jobs run with or without jailshell acess? If so then the last line on your site needs be to be changed [url=http://releases.cpanel.net/releases/11-38/jail-system-update/]Jail System Update | cPanel Releases
    0
  • cPanelMichael
    [quote="crshep, post: 1626851">So your saying cron jobs run with or without jailshell acess? If so then the last line on your site needs be to be changed
    The last line states: [QUOTE]Cron jobs are now run with jailshell.
    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.
    0
  • Lor
    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?
    0
  • Lor
    [QUOTE]Cron jobs run in a jailed shell environment regardless of whether an account is assigned jailshell access or not granted shell access at all.
    Ok. I understand. Now I have to rewrite scripts for 40+ websites because the problem. Thanks.
    0
  • cPanelMichael
    [quote="Lor, post: 1811011">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/'
    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.
    0
  • Lor
    [quote="cPanelMichael, post: 1813332">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?
    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 ...
    0
  • cPanelMichael
    [quote="Lor, post: 1815931">Also I want access from my cron scripts to the disk located outside users accounts.
    Have you considered setting up these cron jobs as the "root" user? Thank you.
    0

Please sign in to leave a comment.