From 8d46ba68d9cdc0207448f0f60eb5e8e706dcc519 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Sun, 08 Feb 2009 10:06:58 -0500 Subject: [PATCH] fixed: FS#482 - Error by help on login --- server/plugins-available/apache2_plugin.inc.php | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 4021a0a..1aef9f1 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -379,9 +379,13 @@ } + if($this->action == 'insert') { + // Chown and chmod the directories below the document root + exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"])); - // Chown and chmod the directories - exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"])); + // The document root itself has to be owned by root + exec("chown root:root ".escapeshellcmd($data["new"]["document_root"])); + } // make temp direcory writable for the apache user and the website user exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp")); @@ -569,7 +573,7 @@ $cgi_tpl = new tpl(); $cgi_tpl->newTemplate("php-cgi-starter.master"); - $cgi_tpl->setVar('open_basedir',$data["new"]["document_root"]); + $cgi_tpl->setVar('open_basedir', "/var/www/" . $data["new"]["domain"]); $cgi_tpl->setVar('php_cgi_bin',$cgi_config["cgi_bin"]); $cgi_starter_script = escapeshellcmd($cgi_starter_path.$cgi_config["cgi_starter_script"]); -- Gitblit v1.9.1