TinyPortal

Development => Support => Topic started by: Dynotrick on June 05, 2007, 01:55:21 PM

Title: Secure Download Folder
Post by: Dynotrick on June 05, 2007, 01:55:21 PM
I searched around a bit but couldn't find anything that addressed this issue really.

I have my download section with membergroup permissions and all is fine there. 

But if I am logged out of my forum (guest) and put in the url to the downloads folder (ex. ../tp-downloads/) anyone can see the directory and the files there.  Is there a way to prevent this while still allowing the proper members to download files while logged into the forum?
Title: Re: Secure Download Folder
Post by: Reality12 on June 05, 2007, 04:59:47 PM
create a blank index.html file in that folder.

lemme know if that works.
Title: Re: Secure Download Folder
Post by: Dynotrick on June 05, 2007, 05:12:16 PM
yea, prevents from seeing the contents of the folder, but you can still download the files as a guest provided you know the exact filename of what you want.  ie. typing the full path into the address bar of the browser.

the security by obscurity is a bit better though ^_^

edit:  also index.html shows now as not assigned in the download manager in the forum admin panels.  not a big deal though.
Title: Re: Secure Download Folder
Post by: IchBin on June 05, 2007, 05:37:13 PM
do you have the .htaccess file in the tp-downloads folder?
Title: Re: Secure Download Folder
Post by: Dynotrick on June 08, 2007, 07:04:37 PM
thanks IchBin... big "duh" for me..  I don't use .htaccess files on my server but i simply put this in the server directives and it did the trick.

  <Directory /var/www/forums/tp-downloads/>
        AllowOverride None
      Order Deny,Allow
      Deny from all
</Directory>