How to allow user with enabled chrooted shell run scheduled tasks outside chrooted environment

Created:

2016-11-16 12:54:37 UTC

Modified:

2017-08-16 16:22:33 UTC

2

Was this article helpful?


Have more questions?

Submit a request

How to allow user with enabled chrooted shell run scheduled tasks outside chrooted environment

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Scheduled tasks running programs that are absent from a virtual host's chrooted shell environment (for example, curl , wget , or php ) fail on domains that are set up to provide chrooted shell access to FTP users.

The following error might occur:

user with id=11112 and name=`<user_name>` not found in chrooted passwd file
system error: No such file or directory

Resolution

Using the utility /usr/local/psa/bin/server_pref , it is possible to configure the server to not set the SHELL variable in users' crontabs, which would 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 SHELL variable, execute the server_pref utility 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

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