We had to recreate out WWW directory on the AFS space after a backup and struggled for a couple of hours to figure out why our cgi-bin php scripts stopped writing to the WWW directory files. Our error was fopen command in php.
It turns out we had to add the groups cgi user to have permission to access the WWW directory.
At our WWW directory we issued the command:
fsr sa . group-groupname rlidwk
That allowed our script to write data to a file in WWW.
Hope this helps someone in posterity.