Posted by Jerry Stuckle on 09/26/06 01:05
veg_all@yahoo.com wrote:
> i am writing a simple script that needs to read data from a file, say
> foo.txt. When the script is called the server is run as 'nobody'. So I
> chmod foo.txt to 606 so that nobody can read and write to it. The
> problem with 606 is that now anyone can simply type in the url to
> foot.txt, i.e http://mysite.com/foo.txt and read its contents. How can
> I prevent this? I suppose I could raname it to foo.php instead?
>
Don't have the file within your web site root directory. Or use Apache
configuration/.htaccess to block access to the file though the web. Or
change the script that reads it to run as another user.
All kinds of possibilities.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|