Web provider changes umask, Gallery stops working

So, I maintain a few web sites and one site uses Gallery software. This worked fine until recently - when a user tried to create a new album, it failed with an error about being unable to create lock files [ Error: Could not open lock file (/..../public_html/albums/album01/photos.dat.lock) for writing! ]

That was a somewhat misleading error, but - in the end, this turned out to be a hosting provider issue, and not a Gallery issue.

Turns out the hosting provider advertently or inadvertently set the default umask for process under Apache to 0111. This umask removes all execute permissions from new files and directories created by scripts run under Apache.

Gallery keeps the default umask, so it inherited the 0111 umask, and when it tried to create a directory with permissions 0700, it in fact got a directory with a permission of 0600 - read, write, but no execute. Of course, without execute permission, a directory is not of much use - cannot move into that directory, cannot create files in that directory, basically, things will start erroring out from that point out. Software could be written to handle this - maybe always do a chmod after a mkdir? But that is a different discussion.

It did not take too long to find this out, but getting this resolved at the hosting provider took a while - explaining umask, mkdir, and directory behavior. I guess that is the first reaction of technical support - they must get too many false reports, that when a real problem comes up, they have to take some time! [Though I am happy with the provider - they were at least engaged and responded fast with questions, and in the end, they resolved this pretty quickly.] Add to this, all morning today the Gallery site was inaccessible - so I could not search the forums for this issue. In any case, this was a new problem, not previously posted on the Web, nor mentioned at the Gallery site.

Another story of accidental complexities in software development. One thing after the other - things break because of a change in configuration, the time spent debugging this, and then it takes a while to convince the powers that be to fix this, and the Gallery site is down when I need it. Just another day in a hobbyists life of maintaining web sites.