- Plesk for Linux
Scheduled tasks that are set to run programs that are absent in a virtual host chrooted shell environment (for example,
php, etc) fail on domains that are set up to provide chrooted shell access to FTP users.
One of the following errors might occur in Plesk:
PLESK_ERROR: user with id=11112 and name=`<user_name>` not found in chrooted passwd file
system error: No such file or directory
PLESK_ERROR: /var/www/vhosts/example.com/httpdocs/app/cake: /usr/bin/env: bad interpreter: No such file or directory
By default, the
/bin/bash (chrooted) shell is configured as the default shell for scheduled tasks.
This makes it so that commands run by scheduled tasks only have access to the files contained within the webspace associated with the subscription.
This is an important security measure that ensures that customers cannot use scheduled tasks to disrupt the operation of the server or access files belonging to the Plesk administrator or to other customers.
Using the Plesk utility
/usr/local/psa/bin/server_pref, it is possible to configure the server not to set the
SHELL variable in users' crontabs.
It will make cron by default use
/bin/sh and allow users with chrooted shell enabled run their scheduled tasks (any command which is available for execution with current user permissions) in a global server environment.
To disable the setting of the
SHELLvariable, execute the
server_prefutility with the following options:
# /usr/local/psa/bin/server_pref --update -crontab-secure-shell ""
To revert the change, use this command:
# /usr/local/psa/bin/server_pref --update -crontab-secure-shell /bin/bash