A truly common problem that affects users in their hosting environments is the lack of popular commands within a chroot environment.
Since you do not want your users to have root access to your server but still want them to be able to execute shell commands, it makes sense to set up a chroot jail. With this setup, you secure your server from the user, as they cannot damage any directory tree other than the one assigned to them. It should be noted, however, that it is possible to escape a chroot jail, but it still provides more than adequate protection against accidental damage. Therefore, you should use it when you trust your users.
After setting up Plesk and enabling chroot for a subscriber, you will quickly notice that many programs such as Git are not available. This is mainly due to the fact that many programs require access to devices and services that are generally not available, as they fall outside the scope of the chroot environment. Adding them is not that difficult.
For example, common requests include ssh, tty, urandom, and so on. To make this easier, Plesk created a tool called update_chroot.sh, which you can download from here. With the following commands, you can add the above components.
Download the tool to /home as root and then run:
If you cannot find one of the commands, try using ‘which ‘, for example ‘which tr’ or ‘which basename’.