Solved

Indexes: directories with restricted content not listed anymore?

Posted on 2004-04-05
6
188 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
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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now