I came across an issue recently with plesk control panel not playing ball with scheduled tasks / cron jobs. Since version 10, plesk places all users into a chroot in their home directory when performing tasks such as cron jobs. The problem with this is that when customers follow the guides of their CMS or any other application by them entering something like the following:
They will find that the above fails miserably no matter how hard they try, ‘wget’, ‘curl’ no matter what as below:
/usr/bin/php: No such file or directory
/usr/bin/wget: No such file or directory
/usr/bin/curl: No such file or directory
Reason for this is that each user has a chroot with a number of binaries available to them in ‘/var/www/vhosts/site.com/bin’ and you’ll find there’s no ‘php’ binary in there. One method around this is to link php into the chroot but an easier way if you do not need the chroot is to switch things back to how they were by running the following on the server:
/usr/local/psa/bin/server_pref -u -crontab-secure-shell “/bin/sh”
This will tell the plesk built-in scheduler / cron handler to use normal /bin/sh allowing references to ‘/usr/bin/php’ to work.
Hope this helps people!