Hi all, sorry for my english. I've problem with phplist and cron jobs on a ispconfig 3 server (ubuntu 10.04). Client put on his cron jobs this string: /usr/bin/php -q /home/of/client/web/lists/admin/cron.php You can find these lines in the file: #!/usr/bin/php <?php system("/usr/bin/php /home/of/client/web/lists/admin/index.php -pprocessqueue -c/home/of/client/web/lists/config/config.php") ?> But nothing work. If I go to see in the server, I find, in /etc/cron.d/ a file, ispc_web40, formatted like this: MAILTO=' ' 10 * * * * web40 /usr/bin/php -q /home/of/client/web/lists/admin/cron.php But without write permission: -rw-r--r-- 1 root root 109 2011-02-09 16:55 ispc_web40 In fact, if I launch the phplist procedure to send the newsletters, nothing happens :-| Where am I wrong?! Tnx All and sorry again for my terrible english
No, because the user haven't shell access. I wish that he used the panel, not the shell: the user puts his string in the cron jobs form, and the cron work. If I let him use the shell, for me is a big problem... However, the result of "crontab -u web40 -l" is "no crontab for web40". Thanks for your reply!
Yes, he do: the user has logged on the panel and used the form for cron jobs. The cron jobs were written to the file /etc/cron.d/ispc_web40, but the jobs don't start. Or rather, maybe I do not understand what the log file to look at whether the process is started or not and what errors have occurred.
What's the output of Code: ls -la /etc/cron.d/ ? What's in /etc/cron.d/ispc_web40? Are there any cron errors in /var/log/syslog or /var/log/messages?
We've got the same problem, output as requested for me: Code: # ls -la /etc/cron.d/ total 28 drwxr-xr-x 2 root root 4096 Feb 16 14:04 . drwxr-xr-x 63 root root 4096 Feb 21 14:12 .. -rw-r--r-- 1 root root 102 Sep 28 2008 .placeholder -rw-r--r-- 1 root root 620 Feb 16 10:44 ispc_chrooted_web58 -rw-r--r-- 1 root root 119 Feb 16 14:04 ispc_chrooted_web59 -rw-r--r-- 1 root root 149 Jan 14 13:02 ispc_web2 -rw-r--r-- 1 root root 499 Aug 4 2010 php5 and the contents of ispc_chrooted_web58 is: Code: # cat ispc_chrooted_web58 MAILTO='' SHELL='/usr/sbin/jk_chrootsh' 0 7 * * * web58 /usr/bin/php -q /var/www/clients/client1/web58/web/billing/admin/cron.php 0 5 * * * web58 /usr/bin/php -q /var/www/clients/client1/web58/web/billing/modules/registrars/enom/enomsync.php 0 6 * * * web58 /usr/bin/php -q /var/www/clients/client1/web58/web/billing/modules/gateways/callback/worldpayfuturepaycharges.php 0 4 * * * web58 /usr/bin/php -q /var/www/clients/client1/web58/web/billing/modules/registrars/nominet/nominetsync.php 0 3 * * * web58 /usr/bin/php -q /var/www/clients/client1/web58/web/billing/modules/registrars/resellerclub/resellerclubsync.php None of these cron jobs seem to run for this user or others and it's the same on other servers we have, any thoughts? What is the chrooted reference and how does this apply? When any of those commands are run from the command line, the script executes in PHP without any problems.
You enabled chrooting for cronjobs, this means that the cronjob is run inside a chroot jail with a limited set of commands available. The php interpreter is not part of the jail, so your cronjobs cant work. The easiets way to work around that is to use: /usr/bin/wget -q http://www.yourdomain.com/billing/admin/cron.php instead. Or use a non chrooted cronjob.
Ah ok, thanks for pointing that out Till - how do you disable chrooting of cronjobs in ISPConfig 3? Thanks David
See client settings on the limits tab. Please be aware that ist a security risk to disable chrooting, if someone is ever able to modify the php script that is run by the cronjob or this script contains a error, they may take over your server if the cronjob is not chrooted.