cron job set up in ISPConfig 3.2.8p1 won't run, [web_root] isn't replaced

Discussion in 'Installation/Configuration' started by Instanerious, Oct 2, 2022.

  1. Instanerious

    Instanerious Member

    I set up a new ISPConfig 3.2 instance to run Nextcloud via the Perfect Server Automated ISPConfig 3 Installation on Debian 10 - 11 and Ubuntu 20.04 guide.

    In the Nextcloud site's cron entries I added one to run:
    Code:
    /usr/bin/php8.1 -f [web_root]/cron.php
    In [web_root]/private/cron_error.log I see many lines like:
    Code:
    /bin/bash: /usr/bin/php8.1: No such file or directory
    This appears to suggest the php8.1 cli executable can't be found.

    In the System Log I see (client web # and host name altered):
    Code:
    Oct  2 06:20:01 xyz CRON[202349]: (webY) CMD (/usr/bin/php8.1 -f /web/cron.php >>/private/cron.log 2>>/private/cron_error.log #host.example.com)
    This appears to suggest that [web_root] is not, in fact, being replaced with var/www/clients/clientX/webY/web as the web UI claims.

    The cron entry does run successfully when I set it up in /var/spool/cron/crontabs/webY (though obviously not using [web_root]. Why won't it work via ISPConfig?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely you enabled chrooted cron but php 8.1 is not installed in the chroot of the site. Either disable chrooting for the cronjob or take care that all programs the cronjob needs like PHP 8.1 are installed inside the jail of this website.
     
  3. Instanerious

    Instanerious Member

    I don't think I visted the client Limits page at all. Anyway, I had "Max. Allowed Cronjob types" set to "URL Cron". I changed it to "Full Cron" and now the cron jobs works. Thanks!
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I'd strongly advice not to set it to full cron: this means it runs without a jail as root. Change it to chrooted cron instead.
     
    ahrasis likes this.
  5. Instanerious

    Instanerious Member

    Thanks for the advice, I've done so.
     
    Th0m likes this.

Share This Page