From d2e848534c0fbfff128ee1d270f2bfc7939276d9 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 8 Sep 2011 15:34:34 +0000
Subject: [PATCH] Fixed: FS#1652 - vmail chown on autoupdate in
 mirrored/gluster environment

---
 install/dist/lib/opensuse.lib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index f9802fff61..fb28d31ce3 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -95,7 +95,7 @@ class installer_dist extends installer_base {
 			caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 		}
 		
-		if($cf['vmail_mailbox_base'] != '' && strlen($cf['vmail_mailbox_base']) >= 10) exec('chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base']);
+		if($cf['vmail_mailbox_base'] != '' && strlen($cf['vmail_mailbox_base']) >= 10 && $this->is_update === false) exec('chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base']);
 
 		$postconf_commands = array (
 			'myhostname = '.$conf['hostname'],
-- 
GitLab