how to prevent dir "indexing" viewable?

N

Noreen

Hello,

I notice that on certain web servers (cpanel), if anyone calls to a
directory on your website, the browser will create a directory listing of
all files in the folder - a bit of a security loophole.

Is there any way to reconfig this aside from placing a dummy index file in
every folder on your site? (I believe these are mostly apache running
cpanel).

thanks for any tips or comments.

noreen w
 
R

Roy Schestowitz

__/ On Monday 29 August 2005 03:51, [Noreen] wrote : \__
Hello,

I notice that on certain web servers (cpanel)


*NIX servers. cPanel is merely a front-end which simplifies management at
file-level.

if anyone calls to a
directory on your website, the browser will create a directory listing of
all files in the folder - a bit of a security loophole.


No. It's exactly what is intended to happen. If you wish for this behaviour
to be stopped (e.g. you run a respectable business and have hidden pages),
then:

In cPanel 10 (maybe earlier too), find Index Manager down the bottom of the
table; click item to deny listing; click directory icon to go a level
deeper.

Is there any way to reconfig this aside from placing a dummy index file in
every folder on your site? (I believe these are mostly apache running
cpanel).


I actually use dummy files too because it allows me to control how they
appear (or /behave/). I can self-tailor messages to suit different
directories. I also use visual (i.e. more informative) re-directions
sometimes, e.g.

<HTML>
<HEAD>
<link rel="stylesheet" href="/roy.css" type="text/css">
<META HTTP-EQUIV="Refresh" CONTENT="1;URL=/proj.htm">
<TITLE>Projects</TITLE>
</HEAD>
<BODY BGCOLOR=EEEEEE>
<H1>Redirection</H1>
You should shortly be redirected to the <B>Projects section</B>
<P>If this does not happen, <a href="/proj.htm">click here</a></P>
</BODY>
thanks for any tips or comments.

noreen w


Hope it helps,

Roy
 
T

Toby Inkster

Roy said:
*NIX servers.

Apache servers.

Apache behaves this way regardless of the platform -- be it Unix,
Linux, Windows, Netware or even OS/2!

(And there are many other non-Apache web servers that do this too.)
 
R

Roy Schestowitz

__/ [Toby Inkster] on Monday 29 August 2005 11:11 \__
Apache servers.

Apache behaves this way regardless of the platform -- be it Unix,
Linux, Windows, Netware or even OS/2!

(And there are many other non-Apache web servers that do this too.)

I struggle to remember what I was thinking when I said that. I already knew
that Apache runs on any platform (seen it in my own eyes), but wasn't too
sure about cPanel, which is often associated with UNIX, at in my
narrow-minded and Open Source-centric world. Thanks for correcting me.

Roy
 
D

Disco Octopus

Hello,
I notice that on certain web servers (cpanel), if anyone calls to a directory
on your website, the browser will create a directory listing of all files in
the folder - a bit of a security loophole.

Is there any way to reconfig this aside from placing a dummy index file in
every folder on your site? (I believe these are mostly apache running
cpanel).

if you have access to your .htaccess file, a quick google search will
show you these and more... look here....

( just randomly chosen from google results )
http://www.arura.com/forums/index.php?showtopic=290
http://www.webmasterworld.com/forum92/4441.htm
http://www.clockwatchers.com/htaccess_dir.html

I think this is what you are wanting in your .htaccess file....

Options -Indexes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top