Subject: Re: apache's umask
To: Chris Jones <chris@cjones.org>
From: matthew sporleder <msporleder@gmail.com>
List: netbsd-users
Date: 10/15/2005 08:17:20
You might be able to set the umask in the apache environment by adding
a umask call to the rc script. (/etc/rc.d/apache) or by patching
gallery to set the chmod with php when you upload files for unzipping,
or set the php umask in the beginning of the script.  (php has chmod
and umask functions.)

_Matt

On 10/15/05, Chris Jones <chris@cjones.org> wrote:
> While troubleshooting a strange problem with the excellent software
> Gallery <http://gallery.menalto.com/>, I found that PHP's umask is 133
> -- in other words, it's masking out the x bit.  In my case, this causes
> problems when unzip tries to extract an archive containing
> subdirectories; it creates a directory that it doesn't have permission
> to traverse.
>
> Anyway, I've been hunting around, trying to find where that umask is
> getting set.  There's no PHP or Apache configuration directive (as far
> as I know) that changes the default umask.  A few greps in /etc/rc.* and
> /etc/rc.d/* turn up only one instance of the umask being set, to 022.
> So what am I missing, and where is this strange umask being set?  Any
> hints would be appreciated.
>
> I'm using NetBSD 2.0/i386, FWIW.
>
> Chris
>