From beb1727bafe6aaab3762c0b1961bcdcb6744e3f1 Mon Sep 17 00:00:00 2001
From: jwarnier <jwarnier@ispconfig3>
Date: Fri, 13 Aug 2010 18:16:53 -0400
Subject: [PATCH] Slightly improve process detection using a well-known UNIX shell trick (use one grep less).

---
 server/lib/classes/system.inc.php |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 8d1f70c..260c214 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -1202,7 +1202,9 @@
 		
 		if($user != '' && $this->is_user($user) && $user != 'root') {
 			$user = escapeshellarg($user);
-			exec("chown $user $dir $dir_cur $dir_new $dir_tmp");
+			// I assume that the name of the (vmail group) is the same as the name of the mail user in ispconfig 3
+			$group = $user;
+			exec("chown $user:$group $dir $dir_cur $dir_new $dir_tmp");
 		}
 		
 		//* Add the subfolder to the subscriptions and courierimapsubscribed files

--
Gitblit v1.9.1