Lunarpages Web Hosting Forum

Author Topic: Prevent browser from showing a folder listing - how?  (Read 4195 times)

Offline Comet Software

  • Spacescooter Operator
  • *****
  • Posts: 40
Prevent browser from showing a folder listing - how?
« on: September 22, 2010, 10:09:36 AM »
We want to set the permissions on an individual folder on our site (i.e.  www.mydomain.com/abc/xyz/) so that if a person using a browser were to type in the folder name they would not be allowed to see the files and subfolders that reside in that folder.  Some sites show a "403 Forbidden" page, which is basically what we want to have happen.  In Plesk we are presented with a number of different users and groups, along with various levels of permissions.  And, as we all know, Plesk "help" really isn't.

We have contacted Lunarpages Tech Support since we thought this would be a fairly simple and straightforward answer, but, they seem very confused and have provided a number of irrelevant and confusing "solutions".  Eventually they seem to be saying that a domain owner cannot do this and that a domain owner would have to contact Lunarpages and get them to set permissions on every folder every time they encounter this need.

Does anybody know how to accomplish this in Plesk?

Offline lexhair

  • Galactic Royalty
  • *****
  • Posts: 427
Re: Prevent browser from showing a folder listing - how?
« Reply #1 on: September 23, 2010, 05:51:36 AM »
The easiest way to do this is to upload a blank file named index.html into the directory.

Your other option is to edit (or create) an .htaccess file with
Code: [Select]
Options All -Indexes in it.

MWaqas

  • Guest
Re: Prevent browser from showing a folder listing - how?
« Reply #2 on: February 10, 2011, 05:01:34 AM »
Hello,

Actually this feature is called directory listing in IIS, and the way Plesk is designed is that either you can enable it on all the directories (folders and sub-folders) in the /httpdocs/ or you can turn it off, so its Plesk causing this not us  :cry:  please use  Options All -Indexes in index file place in every directory you need it to be enabled on.