View directory contents?

View directory contents?

Posted by: flicman
Posted on: 2007-03-10 11:05:00

Hi there.

Using FTP, I've uploaded test files to a directory on my website and can't see them in the directory listing when I type in the URL. There's no index.html page and I've tried putting in an .htaccess page with Options +Indexes as the only line, but that didn't work either. Is there some DreamHost-specific thing that I've missed while searching the Wiki and this board that disallows listing of directory contents? I *can* download the document I've uploaded if I enter the full pathname.

Thanks in advance for your help.

Re: View directory contents?

Posted by: Raz2133
Posted on: 2007-03-10 12:37:00

In reply to:

I've uploaded test files to a directory on my website and can't see them in the directory listing when I type in the URL.


Did you upload the files to the correct path? It will be something like /yourdomain.com/directory/

In reply to:

There's no index.html page and I've tried putting in an .htaccess page with Options +Indexes as the only line


As far as I know, 'Options +Indexes' is the default setting, so you shouldn't need a .htaccess file to make this happen.

In reply to:

Is there some DreamHost-specific thing that I've missed while searching the Wiki and this board that disallows listing of directory contents?


No, nothing DreamHost specific. In-fact, most queries on this subject here on the forum tend to be asking the opposite, how to disable directory listings in Apache.

Are there any other .htaccess files further up the directory tree that may be affecting the directory you are interested in?


Mark

Re: View directory contents?

Posted by: flicman
Posted on: 2007-03-10 15:09:00

Indeed the files are in the correct path - if you type in the entire URL including filename, you're invited to download the test file (or view it, if it's .txt or html or whatever).

I did the .htaccess thing to make certain that there wasn't a DH-specific .htaccess file somewhere that I hadn't seen yet. the +Indexes would have overridden anything upstream if that was the case. My site itself doesn't have anything keeping the directory contents hidden - I used to do this on my old hosts all the time.

I guess I should put in a support request. Thanks for your input!

Re: View directory contents?

Posted by: Raz2133
Posted on: 2007-03-10 17:59:00

In reply to:

Indeed the files are in the correct path - if you type in the entire URL including filename, you're invited to download the test file


Strange indeed.

Since you do not have a .htaccess file active, there aren't many things that I can think of that may be causing the problem. Some things that come to mind...

Incorrect permissions for the directory (should be 755 by default).
'Hidden' file-names (starting with '.' character).
Browser caching previous directory contents, try clearing browser cache.

Mark

I think it's a support request

Posted by: flicman
Posted on: 2007-03-11 11:13:00

Thanks for your input - I'm pretty sure this is a support request. I created a new folder, put a test .txt file and a test .mp3 in it and typed the address in my browser. Up came a page that was exactly what I expected, with "index of /temp" and " Name, Last modified, Size & Description" as sort links across the top, but then there were just two horizontal rules as if the folder was empty.

Very strange.

Re: I think it's a support request

Posted by: Raz2133
Posted on: 2007-03-11 19:30:00

In reply to:

Very strange.


Yes, very strange indeed.

Be sure to post back when you here from support, I would be interested to learn what the problem turns out to be.

Mark

Re: View directory contents?

Posted by: Tron1999
Posted on: 2007-03-12 06:50:00

On a related question I've been wondering about...If I wanted to 'hide' the directory contents of the root directory (or any directory for that matter) Could I simply put a dummy index.html file in the main directory. Just says 'hi' or something. Then it would just say 'hi' instead of listing all the files. Would there be any other way to list the contents of that directory or is that now hidden?

Re: View directory contents?

Posted by: Raz2133
Posted on: 2007-03-12 07:07:00

In reply to:

If I wanted to 'hide' the directory contents of the root directory (or any directory for that matter) Could I simply put a dummy index.html file in the main directory.


Yes, that would work. You could also add the following line to the .htaccess file in that directory, or create the .htaccess file if one does not already exist.

Options -Indexes

This method has the advantage that it will affect the directory in which the .htaccess is placed and all sub-directories, unless over-ridden by another .htaccess file in those sub-directories.

Mark

Tags: directory contentsuploadedhtml pagedreamhosthtaccessthanks in advancedirectory listingindexeswiki