include, chmod, password files
| From: | David Hill | Date: | Wed, 08 Aug 2001 17:53:02 +0000 |
| Subject: | include, chmod, password files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-61877@lists.php.net to get a copy of this message | ||
Hello
If I have a file called db.inc with, for example, this:
<?php
// db.inc
$user = "david";
$pass = "password";
?>
I have a my index.php do a include('db.inc');
ok, that works.
However, any user on the system can read db.inc cause its chmod'd 0644.
If I chmod db.inc 0600 or even 0640, index.php can not include it.
How do I go about protecting my files from being read by users on the system?
Thanks
- David