From time to time, I think about the security of my web site...
PHP-CGI is more secure than the Apache module beacuse you don't need to leave your scripts world-readable.
Then Will said will PHP-CGI is a bit of a nightmare from a security point of view. I assume that's because scripts runs as your user, giving it full read-write access to your entire home directory.
Then SourceForge decided to mount web directories read-only, in the name of security.
So I got this idea into my head of creating a new user in the same group as me, and making my files and directories read-only to the group. In other words, the web server would be able to run the CGI scripts, but wouldn't be able to write or delete any files in my home directory.
(You can accomplish this to some extent by remapping a subdirectory to a different user, but you can't do that for your entire site. The KB says something about breaking scripts, but it seemed okay to me, as long as the script is group-readable. But maybe I'm forgetting something.)
Would this be worthwhile? (i.e. does it do much good?)
Is there an easy way to do it?
Is it a completely stupid idea?
I figured someone who knows more about this than me might have some input.