[horde] Setting of $conf['umask'] = 027 ignored for $conf['log']['type'] = 'file';

Michael M Slusarz slusarz at horde.org
Thu Jan 30 22:28:09 UTC 2014


Quoting Arjen de Korte <arjen+horde at de-korte.org>:

> Citeren Michael M Slusarz <slusarz at horde.org>:
>
>> Quoting Arjen de Korte <arjen+horde at de-korte.org>:
>>
>>> In my horde/config/conf.php I have
>>>
>>> $conf['umask'] = 027;
>>>
>>> and
>>>
>>> $conf['log']['type'] = 'file';
>>> $conf['log']['name'] = '/var/tmp/horde.log';
>>>
>>> Yet the log file that is created, has the following permissions:
>>>
>>> -rw-r--r-- 1 wwwrun www 142941 Jan 30 21:28 /var/tmp/horde.log
>>>
>>> The fact that it is created with world readable permissions  
>>> confuses me. Why is that?
>>
>> Because Horde's umask configuration option is not an absolute umask  
>> - it is applied on TOP of the default system umask (generally 0022,  
>> but can be different).
>
> Now that is what confuses me. Whatever the system defaults are,  
> applying a umask of 027 would mean that the log file would NOT be  
> world readable. Yet it is. Other files created have the expected  
> permissions, so the umask is used, just not for the log file. The  
> only reason I can think of, is that the log file is created before  
> the umask is applied.

Yeah.  Looks like the Horde_Browser object instantiation slipped in  
between when we loaded the base Horde settings and when we set the  
umask, and somewhere in that instantiation a log message is issued --  
and the Registry has marked Horde as initialized, so the log mesage is  
not queued and is sent to the logging backend.

Fixed in Horde_Core 2.12.0

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list