chroot ssh login php

Discussion in 'Installation/Configuration' started by chief, May 29, 2015.

  1. chief

    chief Member HowtoForge Supporter

    I have a problem!!...
    1. create client
    2. create website
    3. create sub domain
    4.create shell-user
    4.a. chroot shell and use jailkit

    all for a client who want to log in and have putty access to their site. if its not chroot'd they can wander the file system (yes/no) when i tested with their login i could cd /var/www/ and see all my other clients websites

    so now the problem:
    when they login they need to run a php script under the command line ie
    "php nameofscript.php"
    but chroot does not have php for the command line, how can i fix it

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    use jk_cp command to install additinal software into the jail.
  3. chief

    chief Member HowtoForge Supporter

    thanks till
  4. chief

    chief Member HowtoForge Supporter

    hi till,
    a follow up question
    does this look right for centos - added to /etc/jailkit/jk_init.ini
    comment the php interpreter and libraries
    = /bin/php
    = /usr/bin/php/, /usr/lib64/php
    and to add php to an existing chroot do i just:
    jk_cp -j /var/www/nameofchroot/ /usr/bin/php
    Last edited: May 29, 2015
  5. chief

    chief Member HowtoForge Supporter

    this is what is found for php
    #whereis php
    php: /usr/bin/php /usr/lib64/php /etc/php.ini /etc/php.d /usr/include/php /usr/share/php /usr/share/man/man1/php.1.gz
  6. Aeon

    Aeon New Member

    howtoforge .de/forum/threads/jailkit-und-php-cli-php-fatal-error.5020/ This Post schould help you. :)

Share This Page