fix permissions in files-directory, if eg. update creates new files, also make nginx.conf a configuration file

This commit is contained in:
Ralf Becker 2017-11-16 19:36:08 +01:00
parent 0e019deb3b
commit ddfe924a62
2 changed files with 7 additions and 1 deletions

View File

@ -1,2 +1,3 @@
/var/lib/egroupware/header.inc.php
/etc/egroupware/apache.conf
/etc/egroupware/nginx.conf

View File

@ -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']);
}
}
/**