[ILUG] umask query

Sean O Sullivan seanos at netsoc.itcarlow.ie
Fri Apr 22 23:32:33 IST 2005


Colm MacCarthaigh wrote:

>On Fri, Apr 22, 2005 at 11:14:30PM +0100, Sean O Sullivan wrote:
>  
>
>>I'm not aware of which mod, or part of apache is creating the files, I 
>>do know that the files are being created by apache, and are being 
>>created in htroot & must have permissions 775.
>>    
>>
>
>o.k. well you're going to have to track that down and change the calls
>for open() to use something other than the default permissions for files
>(666). What are the files called?
>  
>
Thanks - helpful, I'll have to look into that.

>  
>
>>Apache's default umask (compiled in I believe) is set as 755, and ways 
>>of changing are apparently editing the apachectl (however i added umask 
>>002 to this, and it made no difference) and mod_umask was created (with 
>>mod_dav in mind I believe).
>>
>>At this point, I'm thinking umask is not the way to go - since files 
>>/must/ be 775, and umask sets files to 666 max.
>>Problem is - I'm at a slight loss as to how to set file creation mask 
>>(any googling only throws up umask or mod_umask, and not much of 
>>anything else useful).
>>    
>>
>
>It's hardcoded into libc. glibc for example defines the macro
>DEFFILEMODE. *nix systems never create executable files without
>an explicit chmod, it's just part of the security model. 
>
>It's a *really* bad idea changing this.
>
I agree ... however may not have a choice sadly.



More information about the ILUG mailing list