What I was stabbing at, was the fact he wants the file to be written only by the cgi script. If this is so, then why not just have the file set so only the owner of the httpd process has rights to read/write that file?
That of course, is a possibility. But what if the httpd process runs as, say nobody, and you don't have the permissions to chown a file to nobody? Ok, then you probably don't have permission to set a script suid... hmmm, bad luck!