View Single Post
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

Originally Posted by almere View Post

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

root@s1 ~ # /usr/local/ispconfig/server/
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/ /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/ /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/ 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/ on line 302


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

In function _add_jailkit_user.
Now it looks like this:

	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');
			// 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/';
			$command .= ' '.escapeshellcmd($this->parent_domain['system_user']);
			$command .= ' '.escapeshellcmd($this->parent_domain['document_root']);
			$command .= ' '.$jailkit_chroot_userhome;
			$command .= ' '.escapeshellcmd("/bin/bash");
			$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/

Last edited by almere; 23rd November 2012 at 07:08.
Reply With Quote