Parallels Plesk Panel 11 Non-chrooted Cronjobs

///Parallels Plesk Panel 11 Non-chrooted Cronjobs

Parallels Plesk Panel 11 Non-chrooted Cronjobs

Plesk 11 dosn’t allow you to execute cronjobs outside your chrooted shell so e.g. if you want to call a php file over the Plesk Panel cron management you get in trouble becouse the binary dosn’t exists within the chrooted enviroment.

If you trust your customers enough to allow execution of scripts in a non-chrooted environment, you could enable it by the follwoing shell command:

For Plesk Panel 10:

Console command to enable:

/usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell "/bin/sh"

Console command to revert this setting:

/usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell ""


For Plesk Panel 11:

Console command to enable:

/usr/local/psa/bin/server_pref -u -crontab-secure-shell "/bin/sh"

Console command to revert this setting:

/usr/local/psa/bin/server_pref -u -crontab-secure-shell ""

So now the customer is able to use something like the following within the Plesk Panel cron management:

/usr/bin/php -q /var/www/vhosts/yoursite.com/httpdocs/cronjob.php


Please be careful when running these commands, I assume no guarantee for any damage to your systems!

By | 2016-10-29T13:52:45+00:00 January 25th, 2013|Parallels Plesk Panel|1 Comment

One Comment

  1. Michael 08/10/2013 at 23:42

    Thanks for the tutorial, really helped!

    I’m just going to type MediaTemple because that was my use case and I imagine it’s a lot of other people’s too, so hopefully this gets indexed and you get more hits for that.

    Cheers!

Comments are closed.