Article ID: 818, created on Oct 6, 2008, last review on Aug 31, 2016

  • Applies to:
  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux


How to extend chrooted environment with additional commands?


Chrooted shell provides limited functionality. It only allows to use very simple commands such as cp, mv, mkdir, and a few others. Neither tar functionality is not included into the chrooted shell, nor certain other system utilities are.

Find the actual set of utilities that are available in the chrooted environment in the ${HTTPD_VHOSTS_D}/chroot directory hierarchy (HTTPD_VHOSTS_D is defined in /etc/psa/psa.conf; it is /var/www/vhosts in RedHat-based distributions).

If it is needed to add other files to the chrooted environment skeleton (which is copied to each new domain added on to the server), paste them to the appropriate subfolder in the ${HTTPD_VHOSTS_D}/chroot directory. Also, do not forget copying over all dependencies, such as the shared libraries that executables are linked to. To apply the skeleton changes changes to the chroot environments for other existing domains, use the following commands:

    # /usr/local/psa/admin/sbin/chrootmng --remove --source=/var/www/vhosts/chroot --target=${HTTPD_VHOSTS_D}/<domain name>
    # /usr/local/psa/admin/sbin/chrootmng --create --source=/var/www/vhosts/chroot --target=${HTTPD_VHOSTS_D}/<domain name>

For Plesk versions 8.x and 9.x it is possible to use --target=all to cover all hosted domains at once.

The script recreate_chroot_env from the archive attached to this article automates the process. It takes names of the files and directories to add to the chroot skeleton as the parameters:

    #./recreate_chroot_env /usr/bin/php /usr/share/zoneinfo

In the above example, the /usr/share/zoneinfo directory is added together with the PHP interpreter as this directory is required to run .php files properly. Without it, php -i fails with a message: "* glibc detected *."

Search Words

extend chrooted environment

make chown available for all existing vhosts


a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c aea4cd7bfd353ad7a1341a257ad4724a 0a53c5a9ca65a74d37ef5c5eaeb55d7f 01bc4c8cf5b7f01f815a7ada004154a2 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7 742559b1631652fadd74764ae8be475e

Email subscription for changes to this article
Save as PDF