Skip to main content

Default SHELL for cronjobs

Comments

2 comments

  • cPanelMichael
    Hello :) Cron jobs are now run with jailshell. This is normal, and the intended behavior since cPanel 11.38. It's documented at: Jail System Update Is there a specific limitation on cron jobs that is causing issues with your scripts? Thank you.
    0
  • cPanelKenneth
    If the cPanel account is set to use either jailshell, or noshell, then all cron jobs for that user will run using jailshell. If the cPanel account is set to use any other shell (e.g. zsh, bash, etc), then it is possible to use /var/cpanel/crontabshell to set the shell for the cronjobs. To do this, using zsh as an example: echo 'SHELL=/bin/zsh' > /var/cpanel/crontabshell'
    Keep in mind the following: 1. The shell you specify in /var/cpanel/crontabshell must also be present in /etc/shells. 2. The cronjob shell will only change after the crontab is modified via the cPanel UI.
    0

Please sign in to leave a comment.