InstantSSH

  • @dimon


    • You must have the php application section enabled in the plugin configuration file. If it is not the case, you must add it and rebuild the jail.
    • As root user, you must run the following commands:
    Code
    1. root@srv01:~# chroot /var/chroot/InstantSSH/shared_jailroot@srv01:/# mkdir -p /rootroot@srv01:/# mkdir -p /usr/local/binroot@srv01:/# curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/binroot@srv01:/# mv /usr/local/bin/composer.phar /usr/local/bin/composerroot@srv01:/# exit

    Then, composer should be now available for customers but a little problem persist: Even if your customers can invoke composer, composer itself will not be able to write in their home (due to immutable bit). Right now, you can solve the issue for each customer that need composer by creating the .composer directory manually. For instance:


    Code
    1. root@srv01:~# cd /var/www/virtual/xn--brger-kva.com
    2. root@srv01:/var/www/virtual/xn--brger-kva.com# chattr -i .
    3. root@srv01:/var/www/virtual/xn--brger-kva.com# mkdir .composer
    4. root@srv01:/var/www/virtual/xn--brger-kva.com# chown vu2003:vu2003 .composer/
    5. root@srv01:/var/www/virtual/xn--brger-kva.com# chattr +i .

    Note: You must of course adapt commands (directory, user/group...)


    Then now, the xn--brger-kva.com customer can use composer. For instance:


    composer.png



    Here, I've created the composer.json file in the htdocs directory with package I wanted and then, I've just run composer install
    I'll fix all the issues above in next version.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206