[pmwiki-users] umask'ing wiki.d
Patrick R. Michaud
pmichaud at pobox.com
Wed Feb 2 11:10:13 CST 2005
On Thu, Feb 03, 2005 at 12:14:02AM +1300, Robin wrote:
> On Tuesday 01 February 2005 05:19, Patrick R. Michaud wrote:
> > Setting umask(007) as default is probably a good idea; I just need to think
> > about it a little more to make sure I've covered all the bases and
> > won't break a lot of sites by doing that. :-|
> I was going to reply and say that I don't think it could break anything...and
> then it went and broke something else on my server.
>
> It seems that, due to a quirk of PHP, the umask applies to all instances of
> PHP that are running, even if they run something unrelated.
I think it must be something else, or at least more subtle than this.
The umask setting is a per-process setting, thus it's not likely that
one PHP script can directly affect the settings of *all* PHP scripts.
At best it could only do so indirectly -- *all* of the following
would have to be true:
- PHP runs as an apache filter
- An apache process handling a request run the script (PmWiki)
that sets umask
- That same apache process is then re-used for another PHP script
- Neither PHP nor Apache reset the process' umask to a standard
default value
Ultimately I couldn't find anything on the PHP site mentioning this,
and a *lot* of PHP scripts would be breaking if it were indeed possible
for one script to affect the umask settings of other scripts on the
same host. So I think there must be something else going on in your
case (which might bear investigation).
Pm
More information about the pmwiki-users
mailing list