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 http://www.visualcron.com/ExitCodes.aspx 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
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.
the file /var/www/clients/client1/web7/usr/bin/php 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" ??
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?
Did you have a look into the /etc/cron.d/ispc_webXX or ispc_chrooted_webX file? Everything correct in there?
The path to the php script is wrong, it has to be: /web/cronjobs/il_test.php and not: /var/www/clients/client1/web7/web/cronjobs/il_test.php when you call a script inside the jail.
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 /
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.
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
when I do what you wrote, I get the error message "could not open input file: /web/cronjobs/cron_test.php" BUT: running /usr/bin/php /var/www/clients/client1/web7/web/cronjobs/cron_test.php does work. (I setup a different file for better testing) ideas?
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.
interesting, 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>
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.
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"