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.

One thought on “ISPConfig with Jailkit – allowing custom or other commands for users

Leave a Reply