- First install Composer and PHP for the jailed user. This article has the steps
- composer require aws/aws-sdk-php — as the jailed user
- There might be an error –
fopen(/usr/share/php/Composer/Autoload/../../../doc/composer/copyright): failed to open stream: No such file or directory - You can copy the file using the root login
- mkdir -p /var/www/clients/client1/web1/usr/share/doc/composer
- cp /usr/share/doc/composer/copyright /var/www/clients/client1/web1/usr/share/doc/composer/
- chown web1:client1 /var/www/clients/client1/web1/usr/share/doc/composer/copyright
Tag Archives: jailkit
ISPConfig with Jailkit – allowing custom or other commands for users
By default Jailkit allows certain commands or applications only. Below is the process to allow your users to access other commands or any custom command.
Here I wanted users to access PHP commandline and composer
-
If needed then first install those applications normally as root
-
Add entries for the applications/commands to the jailkit config file These block names will be used in ISPConfig. The folder/directories are important - else the necessary libraries and supporting files will not be copied and the application will not work properly for the users.
-
Once the blocks have been added, the programs and all related files will have to be copied to the particular users webspace. The jk_init command copies all files and related libraries with permissions. jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/clientXXX/webXXX php jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/client1/web3 composer
-
After copying the files update the Jailkit section of ISPConfig - add the block names of the applications that the users will be permitted to use System -> Server Config -> Jailkit chroot app section
If the commands are still not accessible – then the users should try relogin first.