Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Debian, protect file from download.


    Hello, I'm making a personal website that will have some files to download. I've made all the system including a simple login with levels per account. Right now only "allowed" people can see certain downloads but if they go to the folder where the files are they can download it if they now the file name... How can I prevent that?


    Thanks, joaogl.

  2. #2
    how are you defining the access to the "allowed" people in web directory? for example, assuming you are using Apache web server, if you use simple .htaccess rules, that would prevent others from accessing the content of the directory, even if they knew the full URL to a file.

  3. #3
    I think you could create "wrapper script" for downloading different files and using account privileges. Files can be placed outside webroot so there's no way to download files directly.

  4. $spacer_open
    $spacer_close
  5. #4
    Yes I'm using apache and I've thought of using .htaccess but I'm still not sure how to protect it using the account privileges...
    about the wrapper script I'm going to look into it. Thanks for the anwers

  6. #5
    Quote Originally Posted by Joaogl View Post
    Yes I'm using apache and I've thought of using .htaccess but I'm still not sure how to protect it using the account privileges...
    i guess it depends on what you mean by "account privileges"...

  7. #6
    Data that given by the SESSION on php

  8. #7
    Quote Originally Posted by Joaogl View Post
    Data that given by the SESSION on php
    Perhaps you can try using an Apache Rewrite rule to redirect the requests to the dir (or files) to your auth PHP script. I'm not too familiar w/PHP auth, but this suggestion might be what you want.

Posting Permissions

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