Error (in debug)

Discussion in 'General' started by almere, Nov 23, 2012.

  1. almere

    almere Member HowtoForge Supporter


    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
  2. almere

    almere Member HowtoForge Supporter


    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');
    			// 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/';
    			$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: Nov 23, 2012
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    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.

    No. Better enter just the URL in the cron field in ispconfig, thats more secure. Cron command:

Share This Page