![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
But if there are more sinister and effective ways to discover filenames inside a directory containing an index.html... are there simple protections to prevent it? |
#3
| |||
| |||
|
|
This may properly belong in some `security' related newsgroup, but I'm asking here because many here are longtime residents on the web and will have good knowledge of something simple like this. With out going to great lengths... how do people prevent casual observers from viewing contents of directories? So far I've just included an index.html in every directory.. (Only a few in my light usage). But I wondered if there is some systematic way of discovering what is in a web available directory that would by-pass index.html? I guess a miscreant could try different filenames after the slash and eventually get lucky but that probably isn't much of a likely-hood. But if there are more sinister and effective ways to discover filenames inside a directory containing an index.html... are there simple protections to prevent it? |
#4
| |||
| |||
|
|
With out going to great lengths... how do people prevent casual observers from viewing contents of directories? |
#5
| |||
| |||
|
|
Harry Putnam wrote: But if there are more sinister and effective ways to discover filenames inside a directory containing an index.html... are there simple protections to prevent it? You don't say what your web server is... Apache? If so, create a file in your root directory named: .htaccess and put this one line in it: # Options -Indexes |
#6
| |||
| |||
|
|
"Beauregard T. Shagnasty" wrote: You don't say what your web server is... Apache? If so, create a file in your root directory named: .htaccess and put this one line in it: # Options -Indexes I want to do the opposite. I'm using WAMP to check pages before uploading. By default, in localhost, index.php opens as a webpage in FF and I'd prefer to see a file list of the pages in the directory so that I can select a page to work on. After some snooping around, I've created an .htaccess file with the single line : Options +Indexes in the root folder but it doesn't appear to have had any effect. |
#7
| |||
| |||
|
|
Josiah Jenkins wrote: "Beauregard T. Shagnasty" wrote: You don't say what your web server is... Apache? If so, create a file in your root directory named: .htaccess and put this one line in it: # Options -Indexes I want to do the opposite. I'm using WAMP to check pages before uploading. By default, in localhost, index.php opens as a webpage in FF and I'd prefer to see a file list of the pages in the directory so that I can select a page to work on. After some snooping around, I've created an .htaccess file with the single line : Options +Indexes in the root folder but it doesn't appear to have had any effect. Remove or rename index.php to something other than a default page. Maybe even something simple such as: index1.php Then the +Indexes will take over. |
#8
| |||
| |||
|
|
With out going to great lengths... how do people prevent casual observers from viewing contents of directories? Observers can't view directories. Web servers can view directories, and they then return the list of content as a web page to the observer. So switch off that feature, and you're OK. I don't know of any web server that has this feature where it isn't also switchable as needed. |
#9
| |||
| |||
|
|
I have an account and an associated personal WWW directory on a large professionally managed university system that runs apache. * From experiment, if I remove the index.html file from my WWW directory, outside observers who link to <http://www.myUniv.edu/~myUserName/> are served a system-generated web page listing the contents of my WWW directory -- **and that's what I want to happen**. I've been told by one poster in an earlier discussion that this is (or can be) a security threat, not to me, but to the university system. * But, the experts running the system seem to allow it. *Comments? |
#10
| |||
| |||
|
|
On Mon, 12 Oct 2009 17:13:14 -0400, "Beauregard T. Shagnasty" a.nony.mous (AT) example (DOT) invalid> wrote: Josiah Jenkins wrote: "Beauregard T. Shagnasty" wrote: You don't say what your web server is... Apache? If so, create a file in your root directory named: .htaccess and put this one line in it: # Options -Indexes I want to do the opposite. I'm using WAMP to check pages before uploading. By default, in localhost, index.php opens as a webpage in FF and I'd prefer to see a file list of the pages in the directory so that I can select a page to work on. After some snooping around, I've created an .htaccess file with the single line : Options +Indexes in the root folder but it doesn't appear to have had any effect. Remove or rename index.php to something other than a default page. Maybe even something simple such as: index1.php Then the +Indexes will take over. That's done the trick (index_1.php) I had discovered that moving the index file out of the folder also worked but that's probably a better workaround. Thanks for the help. |
![]() |
| Thread Tools | |
| Display Modes | |
| |