note 33766 deleted from function.mysql-connect by didou
| From: | didou@php.net | Date: | Mon, 07 Jul 2003 11:01:22 +0000 |
| Subject: | note 33766 deleted from function.mysql-connect by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-51619@lists.php.net to get a copy of this message | ||
Note Submitter: David Arthur
----
>A better way to protect your password/data with PHP and
>MySQL, if you don't need write access, is to have a new
>user, such as "nobody" (which is often the default Apache
>user processing your PHP anyway) who has read-only access
>to your database tables--and connect using nobody and no
>password.
Only do this if you don't have confidential data in the database. Any user with access to the
db server will have access to your data, i'd still use a password just as another level of
protection anyway.
>Another note: Say you want your script to write some files
>to one of your directories, but you don't want the directory
>world-writable. Simply make the directory's group "nobody"
>and chmod it 775. This way, "nobody" will have rw access,
>but nobody else.
If im thinking correctly, this is good as long as someone on the server doesn't write a php
script running it on the same webserver to read the files you've just 'protected'.