Re: permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Benjamin Adams wrote:
I have a text file that is just being read by php
Can I change the permissions of it so www can not read it?
what username does php uses to read files?

Use a .htaccess file, if your web server supports it.

For example, in apache2 you can do this:

<FilesMatch "yourfile.txt">
       Order Allow,Deny
       Deny From All
</FilesMatch>

See: http://httpd.apache.org/docs/2.0/howto/htaccess.html, http://httpd.apache.org/docs/2.0/mod/core.html#files, and http://httpd.apache.org/docs/2.0/mod/core.html#filesmatch

jon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux