The operating system prevents unauthorized file access. Checking if the operating system will block access before trying to read it, doesn't add much to security. A FastCGI daemon will only be able to read files the operating system allows it to read.
In case of PHP, Hiawatha will only send requests for PHP files to the daemon (configured via file extensions). In case of a catch-all FastCGI daemon, it's up to the daemon which file is read. Hiawatha can't do anything about it.
When Hiawatha is not allowed to read it, Hiawatha should not pass it to PHP-CGI. The patch works perfectly for our situation.
This is not true. If I want to run CGI scripts with a different userid that Hiawatha' usedid, you can do so by running the FastCGI daemon with a different userid. You patch makes this no longer possible.
So you tell me that some people are really sending PHP-CGI data over a possibly insecure network that can be sniffed and spoofed? Ever tried to send a spoofed replay IP package with nasty PHP code to the PHP-CGI server?
This is a total different issue and has nothing to do with checking file-permissions. And this issue can easily be solved via a SSL-tunnel.