From 03771e0067e8813c7eb77a0187d533563baecf48 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 16 Nov 2017 19:36:08 +0100 Subject: [PATCH] fix permissions in files-directory, if eg. update creates new files, also make nginx.conf a configuration file --- doc/rpm-build/debian.egroupware-epl-core.conffiles | 1 + doc/rpm-build/post_install.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/rpm-build/debian.egroupware-epl-core.conffiles b/doc/rpm-build/debian.egroupware-epl-core.conffiles index ed34b23dbf..c022e8f0ef 100644 --- a/doc/rpm-build/debian.egroupware-epl-core.conffiles +++ b/doc/rpm-build/debian.egroupware-epl-core.conffiles @@ -1,2 +1,3 @@ /var/lib/egroupware/header.inc.php /etc/egroupware/apache.conf +/etc/egroupware/nginx.conf diff --git a/doc/rpm-build/post_install.php b/doc/rpm-build/post_install.php index 5320abf1be..782320b7a8 100755 --- a/doc/rpm-build/post_install.php +++ b/doc/rpm-build/post_install.php @@ -590,7 +590,7 @@ function usage($error=null) } /** - * fix egw_cache perms evtl. created by root, stoping webserver from accessing it + * fix egw_cache and files_dir perms evtl. created by root, stoping webserver from accessing it */ function fix_perms() { @@ -601,6 +601,11 @@ function fix_perms() system('/bin/chown -R '.$config['webserver_user'].' /tmp/egw_cache'); system('/bin/chmod 700 /tmp/egw_cache'); } + // in case update changes something in filesystem + if (file_exists($config['data_dir']) && !empty($config['webserver_user'])) + { + system('/bin/chown -R '.$config['webserver_user'].' '.$config['data_dir']); + } } /**