mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
"dont unlink header.inc.php for root user, as it get created again with owner root"
This commit is contained in:
parent
53e7c66f51
commit
66451aa99d
@ -138,7 +138,10 @@ class setup_cmd_header extends setup_cmd
|
|||||||
if (file_exists($this->header_path) && is_writable($this->header_path) || is_writable(dirname($this->header_path)) ||
|
if (file_exists($this->header_path) && is_writable($this->header_path) || is_writable(dirname($this->header_path)) ||
|
||||||
function_exists('posix_getuid') && !posix_getuid()) // root has all rights
|
function_exists('posix_getuid') && !posix_getuid()) // root has all rights
|
||||||
{
|
{
|
||||||
if (is_writable(dirname($this->header_path)) && file_exists($this->header_path)) unlink($this->header_path);
|
if (posix_getuid() && is_writable(dirname($this->header_path)) && file_exists($this->header_path))
|
||||||
|
{
|
||||||
|
unlink($this->header_path);
|
||||||
|
}
|
||||||
if (($f = fopen($this->header_path,'wb')) && ($w=fwrite($f,$header)))
|
if (($f = fopen($this->header_path,'wb')) && ($w=fwrite($f,$header)))
|
||||||
{
|
{
|
||||||
fclose($f);
|
fclose($f);
|
||||||
|
Loading…
Reference in New Issue
Block a user