From 730e1c72c1b01e463a12c160bbe34c2afbf7b836 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 9 Nov 2021 09:40:04 +0100 Subject: [PATCH] fix error caused by post_install.php not running as root (default for container) --- doc/rpm-build/post_install.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/rpm-build/post_install.php b/doc/rpm-build/post_install.php index f8c873cf1c..c9a4a838d1 100755 --- a/doc/rpm-build/post_install.php +++ b/doc/rpm-build/post_install.php @@ -382,7 +382,10 @@ if (!isset($GLOBALS['egw_domain']) || $config['domain'] !== 'default' && !isset ','.$config['db_type'].','.$config['db_host'].','.$config['db_port']); run_cmd($setup_header); // fix permissions of header.inc.php - chown($config['header'], $config['webserver_user']); + if (function_exists('posix_getuid') && posix_getuid() === 0) + { + chown($config['header'], $config['webserver_user']); + } chmod($config['header'], 0600); // install egroupware