MyBB Community Forums

Full Version: Protecting Upload Directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have seen many forums that have some folders in the upload directory protected. EX: site.com/uploads/ficons or site.com/uploads/awards.

I tried adding a deny from all rule in .htaccess but it blocks the images. How did most other sites block direct access to those directories?
You really can't. They just have a blank index.html.
When I go on hf.net/uploads/ficons, it gives a no permissions error. Same with http://wweforums.net/uploads/awards/
OH, okay. chmod settings is the key here. 644 for the directory, 755 for the files.
Thanks for the help guys.

I'll play around with the permissions and add an index.php file for now.
You need to disable directory listing. You can try placing "Options -Indexes" in your virtual host configuration in Apache, or your .htaccess file.
I added that and it seems to be working perfectly. Thanks Spork.