I was still having problems with this. I had a file as follows
-rw-rw-r-- 1 diblemar users 0 Jun 8 12:58 /research/cluster/Injects/error.log
I had added apache to the users group and confirmed it with
$ groups apache
apache : apache users
However, I was still getting permission denied errors when my cgi script attempted to open this file for amending.
The fix was restarting apache so that the group changes (and some umask changes I had made) were applied.
Thanks for everyone's help.