ISPC Cron Jobs don't work

Discussion in 'Installation/Configuration' started by manarak, Jun 24, 2012.

  1. manarak

    manarak New Member

    Hi, I have trouble with the cron jobs.

    I have installed ISPC on debian squeeze following falko's perfect server How-To (thanks!)

    I created the cron job in ISPC config under the proper user (web7)

    syslog is telling me the following:
    I also tried to change /usr/bin/php into /var/www/clients/client1/web7/usr/bin/php but the log stays the same, I presume both resolve to the chrooted shell.

    Exit status 17 baffles me a little, according to
    it means "The system cannot move the file to a different disk drive." ??
    (even more baffling, I was unable to find another cron exit codes list on the internet)

    Anyway, I don't know what's wrong.

    I checked the log in /var/log/ispconfig/cron.log, and it says:
    I have no idea what these things mean and if that is the cause of my crons not working.
    Who can help?
    Thank you
    Last edited: Jun 24, 2012
  2. manarak

    manarak New Member

    grep web7 /etc/passwd outputs:

  3. till

    till Super Moderator

    Please undo that as there is no php binary in the jail.

    If you want to execute a php script, then put it into the web folder of the website and then enter the URL starting with http://..... into the cron command field.
  4. manarak

    manarak New Member

    the file
    does exist

    I tried just putting http:// path to the script, but it doesn't work either. CRON now exits with code 8 "not enough storage" ??
  5. manarak

    manarak New Member

    hmmm... I edited /etc/crontab and put it there to run under user web7, and sure enough it ran.

    so why doesn't it run when set inside ISPConfig?
  6. Croydon

    Croydon HowtoForge Supporter

    Did you have a look into the /etc/cron.d/ispc_webXX or ispc_chrooted_webX file? Everything correct in there?
  7. manarak

    manarak New Member

    it *looks* correct:

    (domain being the domain setup on web7)
    Last edited: Jun 25, 2012
  8. till

    till Super Moderator

    The path to the php script is wrong, it has to be:


    and not:


    when you call a script inside the jail.
  9. Croydon

    Croydon HowtoForge Supporter

    Just to be a bit off-topic:
    Maybe this could be automatically done by ISPC when using a chrooted cron. Just replace all "web root" paths with /
  10. manarak

    manarak New Member

    ok, I tried /usr/bin/php /web/cronjobs/il_test.php

    and also just /web/cronjobs/il_test.php

    neither works, both exit with code 17.
  11. Croydon

    Croydon HowtoForge Supporter

    Ok, maybe try this:

    usermod -s /usr/sbin/jk_chrootsh web7

    su web7

    /usr/bin/php /web/cronjobs/il_test.php

    Maybe this gives any more hints. Don't forget to reset the Shell to /bin/false afterwards.

    usermod -s /bin/false web7
  12. manarak

    manarak New Member

    when I do what you wrote, I get the error message "could not open input file: /web/cronjobs/cron_test.php"

    running /usr/bin/php /var/www/clients/client1/web7/web/cronjobs/cron_test.php
    does work.
    (I setup a different file for better testing)

  13. Croydon

    Croydon HowtoForge Supporter

    Have you checked if you are web7 user after doing su ?
    "whoami" or "id" commands should not say "root" then.
    If you are still root after "su" maybe your chroot environment is not working.
  14. manarak

    manarak New Member

    yes, I'm still root

    how to find out why jailkit is not working?
  15. Croydon

    Croydon HowtoForge Supporter

    Check syslog what happens if you su to web7.
  16. manarak

    manarak New Member

    nothing gets logged to syslog
  17. Croydon

    Croydon HowtoForge Supporter

    Sorry i meant /var/log/auth.log
  18. manarak

    manarak New Member


    auth.log says that jk_chrootsh aborted, reason: /var/www/clients/client1/web7 for user web7 (5010) does not contain the jail separator <jail>/./<home>
  19. Croydon

    Croydon HowtoForge Supporter

    Ok, let's try the following:

    usermod -d /var/www/clients/client1/web7/./home/web7 web7

    Then try the su web7 and php call things again.
    If that works, change back the shell:
    usermod -s /bin/false web7

    Then check if the cron job works.
  20. manarak

    manarak New Member

    the reply is
    usermod: web7 is currently logged in

    su web7

    but apparently, that is a lie, because whoami and id still identify me as root

    still getting
    "could not open input file"

Share This Page