View Single Post
  #12  
Old 26th December 2005, 10:51
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default

Ok, OK. I have been progressing a lot in the php-nuke installer.
Here you have a screenshot:

What the script does till now, is:
Create directories and copy the all necessary files to run php-nuke in any given web. Admin, a reseller or a client can use it.
I have a problem though...
This is how my config.lib.php looks right now:
Code:
# php-nuke install function
function make_install_phpnuke($web_id, $username, $path_to_create) {
       
	$web_id = intval($web_id);	
	exec("mkdir $path_to_create");
	system("cp -R /var/www/installers/php-nuke/html/* $path_to_create");
	system("chown -R $username:web$web_id $path_to_create");
}

class isp_web
{

var $FILE = "/root/ispconfig/scripts/lib/config.lib.php";
var $directory_mode = "0755";
var $web_doctype_id = 1013;
var $user_doctype_id = 1014;
.
.
.
etc
I have included config.lib.php in /home/admispconfig/.../tools/test2/install.php that process the form (the picture)
install.php runs fine, but I think that when included in install.php the function make_install_phpnuke() does not run with root priviledges, so the code
Code:
	system("chown -R $username:web$web_id $path_to_create");
does not work. Am I right about this?

Then, I know that when you create an email user that will be the administrator, the directory permissions are changed, and you told me (falko) that only config.lib.php runned with root priviledges, so I guess the code is that changed permissions is in there. I cant find it though.
Can you help me with this?
I'm almost there... almost. And good news is that developing new installers will be very similar.
Thank you.

Last edited by danf.1979; 26th December 2005 at 10:53.
Reply With Quote