Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 24th July 2010, 02:27
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 18 Times in 8 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
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:57.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.