SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can i protect files on server from SOME people (not all of them) ?

    I know about chmod command - what i'm trying to do is - i will make one php script which will check user and pass and then if they are OK - then that user can download some files.

    It's very clear to me almost everything about making this script and setting up chmod values - but look at this example :

    website name : www.my-website.com

    file directory : /files

    file name : example.exe

    So - now i log in and click on some link on the my-page - and i start downloading - BUT what if i'm not registered user and i want to download file example.exe - i point my getright browser (or some other similar program) to www.my-website.com and browse to dir /files - and then copy that file example.exe on to my computer.

    Do you get my point - i need to set up permissions in that way so those registered users CAN download everything but in the same time those others are not suppose to be able to see (or at least copy) any files.

    Can it be done in any way !?

  2. #2
    SitePoint Zealot Andthensometoo's Avatar
    Join Date
    Aug 2001
    Location
    Michigan
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes.
    First what are they a registered user of?
    If they are members of a Message board on your site, there may be a "mod" to use the same database, therefore saving you the trouble of setting up users in a htaccess file.

    If not, HERE here is how to do it using htaccess.
    "If you handle with products .. this is a word to see It"
    elvis.isnotalive.com
    My Complaint Dept
    Visit Interceptor's AV review


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •