Re: Hiding the source!
| From: | Matt McClanahan | Date: | Thu, 17 Aug 2000 19:14:08 +0000 |
| Subject: | Re: Hiding the source! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12326@lists.php.net to get a copy of this message | ||
On Thu, 17 Aug 2000, Claude Cormier wrote:
> Isn't it a question of permission... if you don't give "r" access to
> others and keep this permission for the owner only... How can a file be
> read ?
It's an issue of group or global access in many cases. A common
requirement of all PHP scripts on a given instance of a web server is that
they need to be readable, somehow, by the user that the web server
runs as (We assume that the web server is not running as root, since
that's a Very Bad(tm) idea).
For example, suppose you have five users that write PHP code on your
server. Each owns their own script, but the web server user needs access
to them all, somehow. One common solution is to group-own all the PHP
scripts to the group that the web server user is ('websites', for
example). However, as a consequence of this setup, all five users
have read access to the scripts owned by the other users.
Matt
> James Atkinson wrote:
> >
> > It depends, if all your include files end in .inc, and you don't parse
> > .inc's though the PHP parser. Then someone types in
> > http://www.yourdomain.com/includes/db_login.inc they get
> > your database
> > login and password...and whatever else. So that brings up another point
> > that you should name your include files so they are parsed though the
> > parser. :)