Page 1 of 1

Protecting files download

Posted: Sat Oct 20, 2007 12:22 pm
by Erich le Ghaz
Hi,

I installed FrondEndUsers and CustomContent modules and created a protected page where I placed a link for a file to download. Everything is worlking fine.

Now I tried to protect the file from direct download. I read the forum and tried a .htaccess file with

Deny All
Allow from 127.0.0.1

It worked. Direct access wan't possible any more. Unfortunatly the access via the website was denied too :C

What's wrong?

Thanks in advance.

Christian

Re: Protecting files download

Posted: Sat Oct 20, 2007 12:51 pm
by tsw
use uploads module for the download link

Re: Protecting files download

Posted: Sat Oct 20, 2007 1:39 pm
by Sy
Deny All, means just that...prohibit anyone and everyone.

Allow from 127.0.0.1 means that only users of the local system would be able to download, this means only users of the server, no remote connections.

Re: Protecting files download

Posted: Sat Oct 20, 2007 3:07 pm
by monghidi
My .htaccess file reads like this:

Code: Select all

SetEnvIfNoCase User-Agent "^$" locally_linked=1
SetEnvIfNoCase Referer "^http://www.your_site_name.com/" locally_linked=1
Order Deny,Allow
Deny from all
allow from env=locally_linked
It is located in a directory called "secure" off of "uploads". Seems to work for me in conjunction with FEU and CustomContent. I found it on this forum a while back but can't recall where  ;)

If I'm logged in as a FEU user, the downloads work. If not, they don't.

Try this maybe?

Sorry, forgot to mention that the links to the files only appear on the page if you are a logged-in FEU user.

Re: Protecting files download

Posted: Sat Oct 20, 2007 5:40 pm
by Erich le Ghaz
Hmm Uploads module is no big help I suppose. I installed it, created a category, uploaded a file and... it was still accessible with an direct link.

Maybe I forgot something?

Re: Protecting files download

Posted: Sat Oct 20, 2007 6:16 pm
by Erich le Ghaz
monghidi,

your htaccess is not working, too. I put it under uploads/protected, but could still download the mp3-file with an direct link.

Christian

Re: Protecting files download

Posted: Wed Oct 24, 2007 10:20 pm
by Pierre M.
Hello Christian,

tell more about your hosting context : provider, OS, versions, settings...

Pierre M.