From ab138b2f6794e4e437b29e8e7d7070c1afad390e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 07 Mar 2011 12:08:27 -0500
Subject: [PATCH] Fixed: FS#1547 - Uncompletely changed site's ownership.

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

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 7f356bf..39fdaa7 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -469,7 +469,7 @@
 			exec("setquota -T -u $username 604800 604800 -a &> /dev/null");
 		}
 
-		if($this->action == 'insert') {
+		if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) {
 			// Chown and chmod the directories below the document root
 			$this->_exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"]));
 			// The document root itself has to be owned by root in normal level and by the web owner in security level 20

--
Gitblit v1.9.1