Disable folder listing in your website

Folder listing is an avoidable danger, which you do not want to have in your website. Malicious guys can get access to sensitive information – and you’re dead, Jim!

Simple addition of a .htaccess can be the easy fix.
to block folder view of say folder http://bar.com/foo/

$ cd foo/
$ nano .htaccess
Options -Indexes

Save and close, and thats it ! Yay.
Check http://bar.com/foo/ again.

PS: You can forbid access to foo/file.ext by :

$ chmod 400 file.ext

That would make it completely un-available for public eyes!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s