#1  
Old 18th July 2013, 22:58
keshwarsingh keshwarsingh is offline
Member
 
Join Date: Apr 2013
Posts: 31
Thanks: 2
Thanked 1 Time in 1 Post
Exclamation ISPConfig 3 cron

Hello,

Trying to setup a cron job from the panel & it seems to create the cron within a chroot environment though no jailkit was installed..

MAILTO=''
SHELL='/usr/sbin/jk_chrootsh'

*/2 * * * * web3 /var/www/clients/client2/web3/php -q /var/www/clients/client2/web3/web/tiger/cron.php #xxx.mysite.com


If i create a shell user & set the cron job using crontab -e, everything works fine..

*/2 * * * * php -q /var/www/clients/client2/web3/web/tiger/cron.php

Is there a way to prevent the panel from creating a cron job within a chrooted environment ?
Sponsored Links
  #2  
Old 19th July 2013, 09:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,704
Thanks: 819
Thanked 5,321 Times in 4,174 Posts
Default

There is a bug in the current version when a cronjob is created as admin which is fixed in svn stable branch already.

Workaround:

Create the cronjob as client (us ethe login as function to become the client if you are logged in as admin) and ensure that max cronjob in client limits is set to full.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
  #3  
Old 19th July 2013, 09:35
keshwarsingh keshwarsingh is offline
Member
 
Join Date: Apr 2013
Posts: 31
Thanks: 2
Thanked 1 Time in 1 Post
Default

The max cronjob in client limits has been set to full.

When i log in as client, i cannot see the cron jobs.
  #4  
Old 19th July 2013, 09:42
keshwarsingh keshwarsingh is offline
Member
 
Join Date: Apr 2013
Posts: 31
Thanks: 2
Thanked 1 Time in 1 Post
Default

Max. number of cron jobs -1 has been set.
  #5  
Old 19th July 2013, 09:59
keshwarsingh keshwarsingh is offline
Member
 
Join Date: Apr 2013
Posts: 31
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
There is a bug in the current version when a cronjob is created as admin which is fixed in svn stable branch already.

Workaround:

Create the cronjob as client (us ethe login as function to become the client if you are logged in as admin) and ensure that max cronjob in client limits is set to full.
The cron job is still as follows:

*/5 * * * * web4 /var/www/clients/client1/web4/php -f .....
  #6  
Old 19th July 2013, 10:02
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,704
Thanks: 819
Thanked 5,321 Times in 4,174 Posts
Default

I've tested it here and the cronjobs show up correctly in the client menu when "Max. number of cron jobs" is set to -1. I've tested it in ISPConfig 3.0.5.2 with default theme.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
  #7  
Old 19th July 2013, 10:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,704
Thanks: 819
Thanked 5,321 Times in 4,174 Posts
Default

Quote:
The cron job is still as follows:

*/5 * * * * web4 /var/www/clients/client1/web4/php -f .....
You entered the command in a wrong way, on Linux systems, all commands have to use full paths as the PATH variable is not available when the cronjob is executed. So when you want tp call a script by using the php interpreter, then you have to enter the command as:

/usr/bin/php -f ....

in the command field.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
  #8  
Old 19th July 2013, 10:05
keshwarsingh keshwarsingh is offline
Member
 
Join Date: Apr 2013
Posts: 31
Thanks: 2
Thanked 1 Time in 1 Post
Default

Till i fully agree with you.. The max number of cron jobs is set to -1 with the full as limits..

When i login as client, i can succesfully create the cron job.

But the cron is still created in a chrooted environment..
  #9  
Old 19th July 2013, 10:10
keshwarsingh keshwarsingh is offline
Member
 
Join Date: Apr 2013
Posts: 31
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
You entered the command in a wrong way, on Linux systems, all commands have to use full paths as the PATH variable is not available when the cronjob is executed. So when you want tp call a script by using the php interpreter, then you have to enter the command as:

/usr/bin/php -f ....

in the command field.
Ok i just tried the following as command..

/usr/bin/php -f .....

The cron job is created, but when i login via ssh & sniff the content of /etc/cron.d/ , the content is as follows...

*/5 * * * * web4 /var/www/clients/client1/web4/usr/bin/php -f .....

Why is it putting the home path before the command /usr/bin/php -f ? seems to be chrooted ..
  #10  
Old 19th July 2013, 10:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,704
Thanks: 819
Thanked 5,321 Times in 4,174 Posts
 
Default

Did you change the php path like I explained above?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Closed Thread

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem access ispconfig url wearth General 1 30th May 2013 13:50
No dns zone files created? sjau Installation/Configuration 7 13th March 2012 13:15
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 14:31
ISPConfig installation into multiple OpenVZ containers letezo Installation/Configuration 11 3rd March 2009 22:47
Cron jobs from within ISPConfig - Dont want emails robit Installation/Configuration 5 21st July 2008 17:53


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


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