[ILUG] umask query

Paul Jakma paul at clubi.ie
Fri Apr 22 19:34:55 IST 2005


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?

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.

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:



More information about the ILUG mailing list