Dan Brown wrote:
> I'm going to have to disagree, Charlie, for two reasons.
And I'll have to disagree in turn.
> First, making that file world-readable (as 644 does) is a
> security risk, as it exposes the database password to anybody
> on the system.
AIUI, the database password can be safely put in httpd.conf, so that only the one PHP application has access to it. I forget the magic, but you'll find it in the PHP doco.
> I know that by default nobody logs in to the
> shell, but it still seems needlessly risky.
If the application needs to have read access to the PHP file, the file can be root.www, and have permission 0640.
> Second, having
> it _not_ be www-writable will break the configuration system
> for phpBB.
This is an argument for having one or a few files www writable, but not all of them. And it's also an indication of a poorly designed application (and many PHP applications are poorly designed). Applications really shouldn't be able to modify themselves.
Charlie