/usr/bin/php non existent in cron chrooted shell

Discussion in 'Installation/Configuration' started by Blaasbalg, Aug 9, 2016.

  1. Blaasbalg

    Blaasbalg Member

    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?
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    agentmoller001 likes this.
  3. Blaasbalg

    Blaasbalg Member

    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?
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

Share This Page