I have the same problem. I tracked down that it is a problem encountered when PHP is installed as a module.
I am facing the same problem.
The real problem is that the user and group that apache is running as is falling back to the generic user/group specified in httpd.conf, rather than using the user and group that is specified in the VirtualHost settings.
This only seems to affect PHP as I can execute cgi and perl files and the user/group is stays right, but when I execute something from a php page it reverts back to u:www/g:www and therefore fails cos that user doesn't have permission for what I need the script to do.
I do not have an answer but hopefully someone out there does.
Cyberfez