Could not exec shell /bin/bash with errno = 2

If you are receiving alerts like the following regarding your cPanel cronjob's then this article will show you how to fix the issue:

Could not exec shell '/bin/bash' with errno = 2

In a recent update to the cPanel hosting system, all cronjob's were changed to run in jailed environments, thus any calls to bash related commands now need fully qualified paths.

So, for example if you were running a php command like:

php /path-to-my-script.php

It now needs to be changed to:

/usr/bin/php /path-to-my-script.php

Some common command paths are:




  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is Softaculous?

Softaculous is a commercial script library that automates the installation of commercial and open...

How to upload (Linux Hosting) ?

In this tutor you're about to learn how to upload your website content via FTP client software...

What is www or public_html folder?

Please note that " www"  is just the symbolic link or just a mirror to the public_html directory....

What is .htaccess?

The .htaccess file can be placed in one or more of your /home/user/public_html subdirectories....

How to enable 'register_globals' ?

Since we upgrade all our Linux server to suphp enable, The php_value or php_flag configured will...