Add Drush to Jailkit
Par Mathieu le mardi 16 février 2016, 10:16 - Hacks - Lien permanent
Here is the configuration I use to make Drush working inside a Jailkit chrooted shell :
/etc/jailkit/jk_init.ini :
[php] comment = the PHP interpreter and libraries executables = /usr/bin/php5, /usr/bin/php directories = /usr/lib/php5, /usr/share/php, /usr/share/php5, /etc/php5, /usr/share/php-geshi, [B]/usr/share/zoneinfo[/B] includesections = env [env] comment = environment variables executables = /usr/bin/env [mysql-client] comment = mysql client executables = /usr/bin/mysql paths = /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 [drush] comment = drush (drupal command line) includesections = php, mysql-client, uidbasics, netbasics directories = /usr/share/zoneinfo, /etc/ssl/certs, /usr/share/ca-certificates
Once the jailed shell works, add the Drush dependencies to the jail :
jk_init -v -c /etc/jailkit/jk_init.ini -f -k -j /absolute/path/to/jail/ drush
Commentaires
/absolute/path/to/jail/
Can you post how to find this path?
Thanks
Hello,
It depends where your jail is located.
Using ISPConfig it should be somewhere in /var/www/clients/clientX/webY/ but it depends on your configuration.
The path to the jail root is generally the second parent directory of the home of the jailed user ( /path/to/jail/home/jailed_user/ => cd ../../ => /path/to/jail/).