Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Indexes: directories with restricted content not listed anymore?

Posted on 2004-04-05
6
Medium Priority
?
196 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
5 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month9 days, 10 hours left to enroll

879 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