#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Posts
    14
    Rep Power
    0
    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).
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    St. Louis, Missouri
    Posts
    10
    Rep Power
    0
    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Posts
    14
    Rep Power
    0
    yep, this seems to b the only possibility that really makes sense.

IMN logo majestic logo threadwatch logo seochat tools logo