• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to disallow directory browsing on web server

 
Bartender
Posts: 1973
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you keep someone from typing the URL to a directory in a browser and then having full access to all the files in it?
Often when I do this by accident, I get the message: "Access denied, you do not have permissions to view this folder" (or words to that effect).
How do I set this up?
Is this is a web server permissions issue or does it have to be handled some other way?
Thanks in advance.
-- Mike
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How you disable directory browsing depends on the server that you are using. I can tell you that for Tomcat 4.1 you want to go to the web.xml file in $CATALINA_HOME/conf. In there you will an entry for the default servlet:

Just change the value of the listings init-param to false.
I hope this helps,
Mark
 
Mike London
Bartender
Posts: 1973
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With my web hosting company I can only have one "web app".
Is there a solution for all the other apps I have hosted as well?
Thanks in advance for your reply.
-- Mike
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic