Last active
June 8, 2018 03:43
-
-
Save aristidesneto/f57db09b1a4f0901875aaa77c25cb678 to your computer and use it in GitHub Desktop.
Executar comandos GIT, PHP e Composer com usuário Jail (CHROOT)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Painel ISPConfig 3 | |
| ## Adicionar diretivas para usuario em Jail executar comando como GIT, PHP e Composer | |
| # /etc/jailkit/jk_init.ini | |
| # [GIT] | |
| # Já vem como padrão no arquivo | |
| [php] | |
| comment = the php interpreter | |
| executables = /usr/bin/php, /usr/bin/php5, /usr/bin/php7.1 | |
| directories = /usr/lib/php5, /usr/lib/php, /usr/share/php, /usr/share/php5, /etc/php5/, /etc/php/, /etc/snmp, /usr/share/mibs, /usr/share/snmp, /usr/share/zoneinfo | |
| includesections = extendedshell | |
| [composer] | |
| comment = Dependency Manager for PHP | |
| executables = /usr/local/bin/composer | |
| directories = /usr/local/bin | |
| includesections = php | |
| [env] | |
| comment = environment variables | |
| executables = /usr/bin/env | |
| ## Executar os comandos | |
| ## GIT | |
| jk_cp -v -j /var/www/clients/client0/web1/ /usr/bin/git* | |
| jk_cp -v -j /var/www/clients/client0/web1/ /usr/lib/git-core/* | |
| jk_cp -v -j /var/www/clients/client0/web1/ /usr/share/git-core/* | |
| jk_cp -j /var/www/clients/client0/web1/ /bin/uname | |
| jk_cp -j /var/www/clients/client0/web1/ /usr/bin/curl | |
| jk_cp -j /var/www/clients/client0/web1/ /usr/bin/xargs | |
| jk_cp -j /var/www/clients/client0/web1/ /etc/ssl/certs/* | |
| ## PHP e Composer | |
| jk_init -f -k -j /var/www/clients/client0/web1/ php | |
| jk_init -f -k -j /var/www/clients/client0/web1/ composer | |
| jk_init -f -k -j /var/www/clients/client0/web1/ env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment