Crontab secure shell settings are reset after upgrading Plesk from 10.4.4/11.0.9

Created:

2016-11-16 13:05:03 UTC

Modified:

2017-06-05 05:41:16 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Crontab secure shell settings are reset after upgrading Plesk from 10.4.4/11.0.9

Applicable to:

  • Plesk 10.4 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Windows
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

We did not get run scheduled tasks with non-root users. The scheduled tasks are generating the errors like:

php: command not found
curl: command not found
/usr/bin/curl: No such file or directory
/usr/bin/php: No such file or directory

Secure shell settings used for customers' cronjobs are reset. As a result, some cronjobs fail or work incorrectly.

Example scenario:

Crontab shell was changed to '/bin/bash' via the command line:

# /usr/local/psa/bin/server_pref --update -crontab-secure-shell /bin/bash

In the customer panel a new scheduled task was created. As a result, the user's crontab looked like this:

# crontab -u testuser -l
SHELL=/bin/bash
*/5 * * * * sometask

PP was updated and yet another scheduled task was created. This made the user's crontab start looking like this:

# crontab -u testuser -l
SHELL=/usr/local/psa/bin/chrootsh
*/5 * * * * sometask
*/3 * * * * anothertask

That is, the crontab shell setting was reset to its default value.

Cause

The issue is fixed in Plesk 11.5.30 MU #26 (PPPM-1163)

Resolution

For Plesk 11.5.30 and 12 the issue had already fixed. Make sure that you have installed the latest microupdates .

For the previous versions restore the shell settings manually after the update/upgrade.

In the above example, it would mean re-running this command:

# /opt/psa/bin/server_pref -u -crontab-secure-shell "/bin/sh"

Note : The command will most probably be different for your case. It depends on what shell settings you wish to restore.

Have more questions? Submit a request
Please sign in to leave a comment.