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...).
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!