View Single Post
  #1  
Old 24th July 2010, 03:27
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default Problem getting cron job to run and in need of help :)

The website is "infiniteresponder.mrcomptech.com".
The cron job I created is :

Code:
*       *       *       *       *       web14   /usr/bin/php web/sendmails.php > /dev/null
I have confirmed that web14 is for "infiniteresponder.mrcomptech.com".

Running this from a SSH connection as mct_infres, the ssh user for infiniteresponder.mrcomptech.com works.
Code:
/usr/bin/php web/sendmails.php > /dev/null
After logging in as mct_infres the PWD is "/var/www/clients/client1/web14"
running ls -l as mct_infres:
Code:
dr-xr-xr-x 2 web14 client1 4096 Jul 22 20:09 bin
drwxr-x--x 2 web14 client1 4096 Jul 22 16:27 cgi-bin
drwxr-xr-x 2 web14 client1 4096 Jul 22 20:09 dev
drwxr-xr-x 3 root  root    4096 Jul 22 20:39 etc
drwxr-xr-x 3 web14 client1 4096 Jul 22 20:09 home
dr-xr-xr-x 3 web14 client1 4096 Jul 22 20:09 lib
dr-xr-xr-x 2 web14 client1 4096 Jul 22 20:09 lib64
lrwxrwxrwx 1 web14 client1   57 Jul 22 16:27 log -> /var/log/ispconfig/httpd/infiniteresponder.mrcomptech.com
drwxr-x--x 2 web14 client1 4096 Jul 22 16:27 ssl
drwxrwxrwx 2 web14 client1 4096 Jul 23 17:40 tmp
drwxr-xr-x 7 root  root    4096 Jul 22 20:09 usr
drwxr-xr-x 3 root  root    4096 Jul 22 20:09 var
drwx--x--- 7 web14 client1 4096 Jul 22 21:59 web
After creating the cron job and then running server.sh I get this error twice:
Code:
ERROR: /var/www/clients/client1/web14/bin is not owned by root:root!
This is correct, user web14 and group client1 own this folder.
I thought this should be running as web14 not root, so I don't understand what is happenging here.
If I try making the owner and group root:root then things just get worse.
Here is the complete debug output after creating the cron job and running server.sh:
Code:
23.07.2010-19:43 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
23.07.2010-19:43 - DEBUG - Found 1 changes, starting update process.
23.07.2010-19:43 - DEBUG - Call function 'insert' in plugin 'cron_jailkit_plugin' raised by event 'cron_insert'.
23.07.2010-19:43 - DEBUG - exec: chmod 755 /var/www/clients/client1/web14
23.07.2010-19:43 - DEBUG - exec: chown root:root /var/www/clients/client1/web14
ERROR: /var/www/clients/client1/web14/bin is not owned by root:root!
23.07.2010-19:43 - DEBUG - Added programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client1/web14 '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /bin/basename /usr/bin/dirname /usr/bin/nano'
ERROR: /var/www/clients/client1/web14/bin is not owned by root:root!
23.07.2010-19:43 - DEBUG - Added cron programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client1/web14 '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'
usermod: no changes
23.07.2010-19:43 - DEBUG - Added jailkit user to chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_user.sh web14 /var/www/clients/client1/web14 /home/web14 /bin/bash
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
23.07.2010-19:43 - DEBUG - exec: chmod 755 /var/www/clients/client1/web14
23.07.2010-19:43 - DEBUG - exec: chown root:root /var/www/clients/client1/web14
23.07.2010-19:43 - DEBUG - Jailkit Plugin (Cron) -> insert username:web14
23.07.2010-19:43 - DEBUG - Call function 'insert' in plugin 'cron_plugin' raised by event 'cron_insert'.
23.07.2010-19:43 - DEBUG - Deleted Cron file /etc/cron.d/ispc_web14
23.07.2010-19:43 - DEBUG - Wrote Cron file /etc/cron.d/ispc_chrooted_web14 with content:
MAILTO=''

SHELL='/usr/sbin/jk_chrootsh'

*       *       *       *       *       web14   /usr/bin/php web/sendmails.php > /dev/null

23.07.2010-19:43 - DEBUG - Processed datalog_id 526
23.07.2010-19:43 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
finished.
And in the System Log I get this repeated every minute until deleting the cron job:
Code:
Jul 23 19:46:01 prl-ofc-s01 jk_chrootsh[27195]: path /var/www/clients/client1/web14/dev/ is not owned by user 0
Jul 23 19:46:01 prl-ofc-s01 jk_chrootsh[27195]: path /var/www/clients/client1/web14/dev/ is not owned by group 0
Jul 23 19:46:01 prl-ofc-s01 jk_chrootsh[27195]: abort, /var/www/clients/client1/web14 is not a safe chroot jail.
And from reading another similar thread I created both ftp and ssh users for this web site, but that has not corrected the problem.
Reply With Quote
Sponsored Links