Hi, I seem to be having an issue running PHP scripts with chrooted cron. Despite ISPConfig's default 'Jailkit cron chrooted applications' configuration (which includes /usr/bin/php), the cron error log reports that it does not exist: Code: /bin/bash: /usr/bin/php: No such file or directory I'm running a new ISPConfig 3.1 installation on CentOS 7. I have not modified the default jailkit configuration. Is there something I have overlooked perhaps?
Refer to this recent thread: https://www.howtoforge.com/community/threads/ispconfig-3-wp-cli.73682/ it includes adding php to the jailkit environment (as well as other bits to make wp-cli work, but you can ignore those).
Thank you, I seem to have the jailed PHP part working correctly now (took some time to figure out what directories I needed to include in the jail because I'm running a different PHP package than the official one supplied by CentOS (using PHP 7)). However, I've run into a problem I simply don't know how to solve. My PHP scripts all try to connect to MariaDB through local unix sockets (localhost). This seems to be an issue in a chrooted jail, because PHP cannot reach the socket file. For now I've modified the scripts to connect through TCP instead (127.0.0.1), but this causes a lot of unnecessary overhead. Is there a way I can make the mysql unix socket available to PHP in a jail?
You can bind mount it, or maybe hard link the file if on the same filesystem; see https://www.howtoforge.com/communit...s-device-link-when-linking-mysqld-sock.51096/