From dab85326e23b684ecf731ce5be6b67a563a0f09f Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 08 Feb 2009 09:56:49 -0500
Subject: [PATCH] Updated debian and ubuntu installation instructions.

---
 server/plugins-available/apache2_plugin.inc.php |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 1c7b918..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"));

--
Gitblit v1.9.1