do NOT run fix_perms, if not running as root

This commit is contained in:
Ralf Becker 2019-06-17 11:37:29 +02:00
parent b0d47a8496
commit a8d5c3987d

View File

@ -617,6 +617,9 @@ function fix_perms()
{
global $config;
// chown only works as root (uid=0)
if (function_exists('posix_getuid') && posix_geteuid()) return;
if (file_exists('/tmp/egw_cache') && !empty($config['webserver_user']))
{
system('/bin/chown -R '.$config['webserver_user'].' /tmp/egw_cache');