April 30th, 2001, 09:20 PM
let's imagine there is some file u want to hide on yar server but it needs to b accessable by a script.
so if anyone would find out it'S exact location typing the files url into a browser or ftp client he just should get an error message but accessing it using yar script everything is well.
how to set up such a directory and how must the server b configured to do so?
chmod seems to b not allowed by the hosting sevice
htaccess hmm how to prevent the visitor to get the dialog or how to grab it by the script (and if so how to make sure u don'T have to hardcode the user pswd into it)?
scripts run by http request r handled like "other" users so the files must have an xx6 or xx7.
any ideas would b highly aprecciated sql is no option (non ascii files).
Here's how i've resolved this issue.
I've put all the scripts that I want to be private in a non-web-accessable directory that has me set as the owner, and the web server user (usually "nobody") set as the group. Now, my web server has access to these files, but you can't get to them via the web. Your script can require("/path/to/script.php"); the files, and the users can never see the contents.
yep, this seems to b the only possibility that really makes sense.