Apache can't write files despite permissions/ownership
I've got a perl CGI script that writes data to a flatfile. Works fine on any web server, except the one I'm running on my PC. Apache runs as "apache," files are owned by apache, and I've tried every combination of permissions including 644, 664, 666. The apache user on my system has a shell, so I logged in as apache and I'm able to write to the file just fine on a shell, but Apache is not able to do so through the webserver.
perl v5.8.6, Apache 2.054.
error_log shows nothing, access_log shows http code 200 accesses, with no other useful information. STDERR for the perl "open" command gives "permission denied," but the perl "if(-w "filename")" which tests if the file is writeable by the effective uid/gid returns true.
Is there a known issue relating to this? This is boggling my mind.