From d264f7550c4fcd7ecb795d80c45fefb75ee871c3 Mon Sep 17 00:00:00 2001 From: Thom Pol Date: Sun, 20 Nov 2022 21:18:27 +0100 Subject: [PATCH] Set correct permissions for Roundcube when nginx is used (#79) --- lib/os/class.ISPConfigDebianOS.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/os/class.ISPConfigDebianOS.inc.php b/lib/os/class.ISPConfigDebianOS.inc.php index 28ebca1..b1472b4 100644 --- a/lib/os/class.ISPConfigDebianOS.inc.php +++ b/lib/os/class.ISPConfigDebianOS.inc.php @@ -647,6 +647,11 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"'; $result = $this->replaceContents('/etc/apache2/conf-enabled/roundcube.conf', $replacements); } elseif(ISPConfig::$WEBSERVER === ISPC_WEBSERVER_NGINX) { symlink('/usr/share/roundcube', '/usr/share/squirrelmail'); + $cmd = 'chown root:ispapps /etc/roundcube/debian-db.php ; chmod 640 /etc/roundcube/debian-db.php ; chown root:ispapps /etc/roundcube/config.inc.php ; chmod 640 /etc/roundcube/config.inc.php ; chown -R ispapps:adm /var/log/roundcube ; chmod -R 750 /var/log/roundcube ; chown -R ispapps:ispapps /var/lib/roundcube/temp ; chmod -R 750 /var/lib/roundcube/temp'; + $result = $this->exec($cmd); + if($result === false) { + throw new ISPConfigOSException('Command ' . $cmd . ' failed.'); + } } } -- GitLab