Hi, I have a problem with cronjob and jailkit. A user need to execute a php scritp that is in his directory (/home/client17/web20/web/orsee/admin/cron.php). Php is listed in Jailkit cron chrooted applications, but there's no php in usr/bin under /home/client17/web20. Is it correct? I added the cronjob via ispconfig gui and I have ispc_chrooted_web20 file in /etc/cron.d: MAILTO='' SHELL='/usr/sbin/jk_chrootsh' 25 15 * * * web20 php -q web/orsee/admin/cron.php &> log.txt It doesn't work. My question is this: if /etc/passwd says web20:x:5016:5018::/home/client17/web20/./home/web20:/usr/sbin/jk_chrootsh and the user web20 is jailed in /home/client17/web20/home/web20, how can it access/home/client17/web20/usr/bin? A.
This can't work for several reasons, first, you don't use the full path to the php binary. In a Linux cronjob you have to use the full path to all programs that you call. The second issue is that the path to your php script is wrong, the right path would be web/orsee/admin/cron.php and the third issue is that you probably don't have PHP installed in that jail. There is a easy solution for that, delete this cronjob and create a new one where you just enter the full URL to this cron script in th command field. e.g.: http://yourdomain.tld/orsee/admin/cron.php Thats all (plus the times when this url shall be called off course).
There's no way to have the script run. It's a matter of php and all his library. I cannot wget it because the script is under authentication and wget downloads the login page..... A.