I was able to get it to run by commenting the following line: Code: #SHELL='/usr/sbin/jk_chrootsh' Does this shed light on any new ideas?
What you did now is that you diosabled the chroot, thats basically the same as if you used a non chrooted cronjob in ispconfig. So either wget is not properly installed in the chroot as I talked about in #19 of this thread or there is a problem with the jailkit install on your server. Any errors in the syslog or messages log?
Nothing in the logs that is relevant to jailkit or cron other than the successful commands being run from cron which were similar type entries before commenting the file. I realized that commenting it out would make it run out of the jail and not a permanent fix, but it was just the next step of t-shooting. At least we know that cron is working on the server, just not in a chroot'd environment. Is there some way to determine whether jailkit is installed correctly? I have confirmed that wget is installed in the chroot environment for this web. It exists in both the .../web3/usr/bin/wget and in .../web3/bin Anything else to check? Thanks for the help, btw!!!
I created a new shell user (web3sys) and was able to login via ssh and run wget successfully. How does the /etc/cron.d/ispc_chrooted_web3 file know which user to use?
One other thing... One of the scripts that I need to run via the jailed cron is under a utility directory that has htaccess authentication requirements. How can I get it to ignore that? Disregard, I figured it out by adding: Code: ... /ur/bin/wget http://user:[email protected]/cron.php Thanks guys for all the help!
It is the crontab of the user web3, so it runs under this user. Maybe you want to file a bugreport for this in the bugtracker, as it should work even if there is no shell user in the website.
Having same problem Sorry to resurrect this thread, but I seem to be experiencing the same problem with cron jobs. I'm using v.3.0.3.2 and I have wget installed and functioning in the chroot jail. However, the cron jobs just fail to run and I get log messages such as --------------------- Connections (secure-log) Begin ------------------------ **Unmatched Entries** jk_chrootsh: abort, path /var/www/clients/client1/web1/./home/web1 is not owned by 5004: 3 Time(s) jk_chrootsh: path /var/www/clients/client1/web1/./home/web1 is not owned by group 5005: 3 Time(s) jk_chrootsh: path /var/www/clients/client1/web1/./home/web1 is not owned by user 5004: 3 Time(s) ---------------------- Connections (secure-log) End -------------------- whenever the cronjob tries to run I am using cronjobs such as: /usr/bin/wget -O - -q -t 1 http://my.ip.address/cron.php Am I being thick here? This has me baffled. PS. Thanks for all the great work. I've got your manual, but I don't see in there what I'm doing wrong either. Looking forward to the billing module!
This weekend I spent more than a day on getting jailed cron to work in ISPConfig 3.0.5. in Debian 64. On the internet I see lots of people with troubles with cron, finally implementing some hack or workaround. OVH doesn't deliver jailkit preinstalled on their implementation of the perfect server, so I had to install it afterwards. First: it is not necessary to reinstall ISPConfig as I saw someone on the internet suggest, so after installing JailKit only a (forced) update of ISPConfig will do to get the installed jailkit configured. (only say 'yes' to recofigure services) Normal update: ispconfig_update.sh Forced update: cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz tar xvfz ISPConfig-3-stable.tar.gz cd ispconfig3_install/install php -q update.php Second: jailkit/ISPConfig put lots of crappy users with the same user-id/group-id in the jailed /etc/password (/var/www/clients/client1/web1/./etc/passwd) when you add (the mandatory) shell users for the website. You only need one, with the home-directory pointing at only the jailed view of the user-directory, so just /home/user. Chroot will add the rest. (/var/www/clients/client1/web1/.) So you can discard the other users in that file with the same user id. I saw user 'web1' is regenerated just as quick, and Always has an empty directory, so probably you'll need 'web1' as a shell-user. I've not come that far to try... Let's continue with what I did see: The jailed /etc/passwd-file contains /bin/bash as shell. This is no problem. Only the real /etc/passwd-file should contain /usr/sbin/jk_chrootsh as shell. Further more, when you are going to test crontab be aware that ISPConfig itself has a cron-job running every minute to apply the cron-changes that you enter through ISPConfig. That's why scheduling the next minute won't show any result. Always schedule the minute after the next minute to get a result. And finally: I entered a URL to be executed. When looking at the logs some parameters were added to wget that broke it. I copied the complete wget - entry and it worked after I erased -q and -O. I suspect -O to interpret the following URL as output-file or something. Finally I've got it working, but that was only possible with the debug-hint at the end of the (paid for) manual.
I know it is an old post but I have similar problem with IspConfig and cronjob. I'm trying to setup cronjob on centos6 with IspConfig3: [root@server1 log]# crontab -l * * * * * /usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log 30 00 * * * /usr/local/ispconfig/server/cron_daily.sh > /dev/null 2>> /var/log/ispconfig/cron.log 0 0 * * * /usr/local/ispconfig/server/scripts/create_daily_nginx_access_logs.sh > /dev/null 2>> /var/log/ispconfig/cron.log [root@server1 cron.d]# ls -lt -rw------- 1 root root 4775 Mar 2 17:41 nohup.out -rw-r--r-- 1 root root 239 Mar 2 17:35 ispc_web42 -rw-r--r-- 1 root root 1202 Mar 2 17:16 ispc_web1 -rw-r--r-- 1 root root 225 Mar 2 17:15 ispc_web38 -rw-r--r-- 1 root root 247 Mar 1 21:55 ispc_web13 -rw-r--r-- 1 root root 237 Feb 5 12:46 ispc_web39 These files are not executed, and all of them have similar content: [root@server1 cron.d]# cat ispc_web42 MAILTO='' SHELL='/bin/sh' * */3 * * * web42 /usr/bin/php -f /var/www/clients/client1/web42/web/cron/backup.php */10 * * * * web42 /usr/bin/php -f /var/www/clients/client1/web42/web/cron/smksa.php However, when I execute them directly in console, the commands are working without problems: [root@server1 cron.d]# /usr/bin/php -f /var/www/clients/client1/web42/web/cron/backup.php DONE - BACKUP completed! I don't have anything in log files, no issues, no messages, nothing. Please if you have any advice, I will appreciate any idea. Thanks!