Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Indexes: directories with restricted content not listed anymore?

Posted on 2004-04-05
6
Medium Priority
?
195 Views
Last Modified: 2010-03-04
My ISP has upgraded the server hosting one of my websites. On the new server, the version of Apache is 2.0.46 (on the old one it was 1.3 I think). There may also be a different httpd.conf file --which I don't have access to.

Before the change, directories with subdirectories would be indexed completely, including the subdirectories with forbidden access (however, trying to click on one of those would give a "Forbidden" error). In the new setup, only those subdirectories that can be explored are listed.

For example, assume 3 directories:

store/
store/foo/
store/bar/

I want both users "foo" and "bar" to see the index of store/  (which is "Parent dir", "foo" and "bar"). Of course, user "foo" can not go *into* directory store/bar, and vice-versa "bar" cannot go into store/foo, but both "foo" and "bar" have complete listing access to store.

I have appropriate .htgroup and .htpasswd files defining access and group membership of users foo and bar. Then, I have an .htaccess file per directory:

store/.htaccess:
Options +Indexes
AuthUserFile /home/mydom/.htpasswd
AuthGroupFile /dev/null
AuthName "Store areas"
AuthType Basic
<Limit GET>
require valid-user
</Limit>

store/foo/.htaccess:
AuthType Basic
AuthName "Private area for Foo"
AuthUserFile /home/mydom/.htpasswd
AuthGroupFile /home/mydom/.htgroup
Require group foo

store/bar/.htaccess:
AuthType Basic
AuthName "Private area for Bar"
AuthUserFile /home/mydom/.htpasswd
AuthGroupFile /home/mydom/.htgroup
Require group bar

With the previous setup, everything was fine (both foo and bar could see the entire index of store, but go only in their own directory). Now, only the directory(ies) they have access to are listed by mod_index. Is there some Apache variable that may be set differently by my ISP, or is it just the different version of Apache that caused this? In any case, How can I get back to the previous behavior with Apache2.0?
0
Comment
Question by:demartines
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:j_dyer
ID: 10765193
OK, I'm guessing here, but to get back to how things used to work, you could try adding the following to store/.htaccess:
AddIcon /icons/dir.xbm foo
AddIcon /icons/dir.xbm bar

The path to icons may differ on your server.

I havn't tried it, it may well not work, it's just a gut instinct.
0
 

Author Comment

by:demartines
ID: 10767731
No, I tried and it doesn't seem to work. I verified the path for the icon which is /icons/folder.gif (that is what's normally accessed for folders, according to the access log). Thanks anyway for the try.
0
 
LVL 4

Accepted Solution

by:
maverick65 earned 2000 total points
ID: 10772621
There are several scenarios
1) mod_autoindex not loaded at all => no chance contact your ISP
2) Indexing disabled by default
    a) AllowOverride Indexes not configured => no chance contact your ISP
    b) AllowOverride Indexes configured:
Add
Options +Indexes
to the .htaccess files

0
 
LVL 3

Expert Comment

by:shaggyb
ID: 10781409
i had the same problem i had indexing enabled on that version and if i had too many items in a directory then some would not be shown..... if i removed them or created sub directorys and put those files into subdirectorys then it worked fine....i think there is a bug in that version of apache...i went back to apache 1.3 i think is the version and it works fine
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 11760915
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

    ACCEPT: maverick65

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Periwinkle
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question