Apache Web-Serving with Mac OS X, Part 4
Subject:   Apache Permissions and PHP mkdir()
Date:   2002-04-16 17:24:37
From:   morbus
Response to: Apache Permissions and PHP mkdir()

Apache does come with a "suexec" option, which allows you to say "hey, run these CGI scripts as morbus/users". By so doing, all files your scripts create would be owned by the "morbus" user, and would have the default umask normally set (644, I believe).

I don't know if PHP has the same ability, but it does have a chown function so you may want to experiment there.