From c6f5f009a2197c09a541e769376f85e2a89e3bec Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 05 Jul 2009 08:30:43 -0400
Subject: [PATCH] 

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

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index bfdc6bf..e21eb3b 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -476,27 +476,14 @@
 			exec("chmod 711 ".escapeshellcmd($data["new"]["document_root"]."/*"));
 			exec("chmod 710 ".escapeshellcmd($data["new"]["document_root"]."/web"));
 			
-			//* Change the home directory and group of the website user
-			$command = 'usermod';
-			$command .= ' --groups sshusers,'.escapeshellcmd($web_config['group']);
-			$command .= ' '.escapeshellcmd($data["new"]["system_user"]);
-			exec($command);
-			$app->log("Modifying user: $command",LOGLEVEL_DEBUG);
-		
-			// make temp direcory writable for the apache user and the website user
-			// exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));
+			//* add the apache user to the client group
+			$app->system->add_user_to_group($groupname, escapeshellcmd($web_config['user']));
+			
 		// If the security Level is set to medium
 		} else {
 		
 			exec("chmod 755 ".escapeshellcmd($data["new"]["document_root"]."/"));
 			exec("chmod 755 ".escapeshellcmd($data["new"]["document_root"]."/*"));
-			
-			//* Change the home directory and group of the website user
-			$command = 'usermod';
-			$command .= ' --groups sshusers ';
-			$command .= ' '.escapeshellcmd($data["new"]["system_user"]);
-			exec($command);
-			$app->log("Modifying user: $command",LOGLEVEL_DEBUG);
 		
 			// 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