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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd November 2012, 06:24
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Exclamation Error (in server.sh debug)

Hi,

That's debug from server.sh . Because of this i cant update anything. Please, help!


Code:
root@s1 ~ # /usr/local/ispconfig/server/server.sh
23.11.2012-05:21 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
23.11.2012-05:21 - DEBUG - Found 5 changes, starting update process.
23.11.2012-05:21 - DEBUG - Calling function 'insert' from plugin 'cron_jailkit_plugin' raised by event 'cron_insert'.
23.11.2012-05:21 - DEBUG - Added programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client1/web8 '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico'
23.11.2012-05:21 - DEBUG - Added cron programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client1/web8 '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'
usermod: no changes
23.11.2012-05:21 - DEBUG - Added jailkit user to chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_user.sh web8 /var/www/clients/client1/web8 /home/web8 /bin/bash
PHP Fatal error:  Call to a member function mkdir() on a non-object in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 302
Reply With Quote
Sponsored Links
  #2  
Old 23rd November 2012, 06:39
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

Quote:
Originally Posted by almere View Post
Hi,

That's debug from server.sh . Because of this i cant update anything. Please, help!


Code:
root@s1 ~ # /usr/local/ispconfig/server/server.sh
23.11.2012-05:21 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
23.11.2012-05:21 - DEBUG - Found 5 changes, starting update process.
23.11.2012-05:21 - DEBUG - Calling function 'insert' from plugin 'cron_jailkit_plugin' raised by event 'cron_insert'.
23.11.2012-05:21 - DEBUG - Added programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client1/web8 '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico'
23.11.2012-05:21 - DEBUG - Added cron programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client1/web8 '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'
usermod: no changes
23.11.2012-05:21 - DEBUG - Added jailkit user to chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_user.sh web8 /var/www/clients/client1/web8 /home/web8 /bin/bash
PHP Fatal error:  Call to a member function mkdir() on a non-object in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 302


Well....

I had to comment 3 lines in file "/usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php"

In function _add_jailkit_user.
Now it looks like this:

Code:
	
	function _add_jailkit_user()
	{
			//add the user to the chroot
            $jailkit_chroot_userhome = $this->_get_home_dir($this->parent_domain['system_user']);
			
			if(!is_dir($this->parent_domain['document_root'].'/etc')) mkdir($this->parent_domain['document_root'].'/etc');
			if(!is_file($this->parent_domain['document_root'].'/etc/passwd')) exec('touch '.$this->parent_domain['document_root'].'/etc/passwd');
			
			// IMPORTANT!
			// ALWAYS create the user. Even if the user was created before
			// if we check if the user exists, then a update (no shell -> jailkit) will not work
			// and the user has FULL ACCESS to the root of the server!
			$command = '/usr/local/ispconfig/server/scripts/create_jailkit_user.sh';
			$command .= ' '.escapeshellcmd($this->parent_domain['system_user']);
			$command .= ' '.escapeshellcmd($this->parent_domain['document_root']);
			$command .= ' '.$jailkit_chroot_userhome;
			$command .= ' '.escapeshellcmd("/bin/bash");
			exec($command);
				
			$this->app->log("Added jailkit user to chroot with command: ".$command,LOGLEVEL_DEBUG);
				
			mkdir(escapeshellcmd($this->parent_domain['document_root'].$jailkit_chroot_userhome), 0755, true);
			chown(escapeshellcmd($this->parent_domain['document_root'].$jailkit_chroot_userhome), escapeshellcmd($this->parent_domain['system_user']));
			chgrp(escapeshellcmd($this->parent_domain['document_root'].$jailkit_chroot_userhome), escapeshellcmd($this->parent_domain['system_group']));
			
	}

What is the right solution for it?

P.S. is it a good cron command for Debian Squeeze? /usr/bin/php /var/www/site.com/web/path/admin/cron.php

Last edited by almere; 23rd November 2012 at 07:08.
Reply With Quote
  #3  
Old 23rd November 2012, 10:06
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
 
Default

I guess you use one of the prereleases as this code is not in a final version. If you use a prerelease, then update to the latest version from the 3.0.5 stable branch to fix this.

Quote:
/usr/bin/php /var/www/site.com/web/path/admin/cron.php
No. Better enter just the URL in the cron field in ispconfig, thats more secure. Cron command:

http://site.com/path/admin/cron.php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

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
Ssl is not writed on apache servidoresadmin.com General 1 19th November 2012 22:35
Mirroring Questions nayr Tips/Tricks/Mods 8 29th August 2011 22:02
FreeRadius + MySQL working, but I don't know how to customise SQL queries awe Installation/Configuration 4 5th April 2010 00:28
Default .htaccess/index.html getting restored? StrikerNL Installation/Configuration 11 1st July 2009 15:12
/tmp filled with clamav files --> user over quota ArnOS Installation/Configuration 28 15th March 2008 10:19


All times are GMT +2. The time now is 06:00.


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