[ILUG] umask query

Sean O Sullivan seanos at netsoc.itcarlow.ie
Fri Apr 22 19:45:51 IST 2005


Paul Jakma wrote:

> On Fri, 22 Apr 2005, Sean O Sullivan wrote:
>
>> lo,
>>
>> Need files and directories to be created with permissions '775'.
>> umask should then be set to '002', however, apparently when set umask 
>> it is set, it will dictate that directories will be created as '775', 
>> however files as '644' (with a umask of 002).
>
>
> What is creating the file?

Apache

>
> Likely whatever created the file specified 0644. A umask is 
> subtractive, it can only 'remove' permission bits - not add them, so 
> if a file is created by an application with permission bits /not/ set, 
> there is no way a umask can 'add' them.
>
> See 'man -s 2 chmod'.
>
>> (not actually using umask command, will be using mod_umask for 
>> apache, so unsure how successful passing switches would be ...).
>
>
> Likely you want to be looking for some kind of 'default permissions 
> for files' type parameter, not system umask per se.


Yes, sadly that does not seemingly exist (that I know of...), and I 
think umask (or in this case mod_umask for apache) is the only way of 
doing it  (however files /must/ have 775).
Doing a chmod of all files takes ... 5+ mins & produces 60+megs of audit 
logs (lots of files...).



More information about the ILUG mailing list