Tag Archives: jailkit

Installing Amazon SDK on ISPConfig systems

  1. First install Composer and PHP for the jailed user. This article has the steps
  2. composer require aws/aws-sdk-php  — as the jailed user
  3. There might be an error –
    fopen(/usr/share/php/Composer/Autoload/../../../doc/composer/copyright): failed to open stream: No such file or directory
  4. You can copy the file using the root login
    1. mkdir -p /var/www/clients/client1/web1/usr/share/doc/composer
    2. cp /usr/share/doc/composer/copyright  /var/www/clients/client1/web1/usr/share/doc/composer/
    3. chown web1:client1 /var/www/clients/client1/web1/usr/share/doc/composer/copyright

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

  1. If needed then first install those applications normally as root
  2. 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.
  3. 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
    
  4. 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.