From 8ddcb0d7ac2141b934c789cd7b5cf06f05e730b0 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Tue, 18 Feb 2014 09:27:43 -0500
Subject: [PATCH] Merge remote-tracking branch 'origin/stable-3.0.5'

---
 install/dist/lib/opensuse.lib.php |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 7d97977..c66d888 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -496,6 +496,9 @@
 
 		exec("chmod 600 $config_dir/$configfile");
 		exec("chown root:root $config_dir/$configfile");
+		
+		// Dovecot shall ignore mounts in website directory
+		exec("doveadm mount add '/srv/www/*' ignore");
 
 	}
 
@@ -554,7 +557,9 @@
 		unset($content);
 
 		// Add the clamav user to the vscan group
-		exec('groupmod --add-user clamav vscan');
+		//exec('groupmod --add-user clamav vscan');
+		$command = 'usermod -a -G clamav vscan';
+		caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
 
 	}
@@ -672,7 +677,7 @@
 
 		$content = rf('/etc/apache2/httpd.conf');
 		if(!stristr($content, 'Include /etc/apache2/sites-enabled/')) {
-			af('/etc/apache2/httpd.conf', "\n<Directory /srv/www>\n    Options FollowSymlinks\n</Directory>\n\nInclude /etc/apache2/sites-enabled/\n\n");
+			af('/etc/apache2/httpd.conf', "\n<Directory /srv/www>\n    Options +FollowSymlinks\n</Directory>\n\nInclude /etc/apache2/sites-enabled/\n\n");
 		}
 		unset($content);
 
@@ -1076,18 +1081,22 @@
 		// and must be fixed as this will allow the apache user to read the ispconfig files.
 		// Later this must run as own apache server or via suexec!
 		if($conf['apache']['installed'] == true){
-			$command = 'groupmod --add-user '.$conf['apache']['user'].' ispconfig';
+			//$command = 'groupmod --add-user '.$conf['apache']['user'].' ispconfig';
+			$command = 'usermod -a -G ispconfig '.$conf['apache']['user'];
 			caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 			if(is_group('ispapps')){
-				$command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps';
+				//$command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps';
+				$command = 'usermod -a -G ispapps '.$conf['apache']['user'];
 				caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 			}
 		}
 		if($conf['nginx']['installed'] == true){
-			$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispconfig';
+			//$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispconfig';
+			 $command = 'usermod -a -G ispconfig '.$conf['nginx']['user'];
 			caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 			if(is_group('ispapps')){
-				$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps';
+				//$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps';
+				$command = 'usermod -a -G ispapps '.$conf['nginx']['user'];
 				caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 			}
 		}

--
Gitblit v1.9.1