Bug 201816 - mod_autoindex misses some files
Summary: mod_autoindex misses some files
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: httpd
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Joe Orton
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-09 00:59 UTC by eric pretorious
Modified: 2008-04-09 18:28 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-14 14:50:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot (29.55 KB, image/png)
2006-08-09 17:57 UTC, eric pretorious
no flags Details

Description eric pretorious 2006-08-09 00:59:48 UTC
Description of problem:
mod_autoindex misses some files in DocumentRoot subdirectories.

Version-Release number of selected component (if applicable):
httpd-2.0.52-22.ent

How reproducible:
Every time.

Steps to Reproduce:
1. Configure Apache (/etc/httpd/conf/httpd.conf):

> DocumentRoot "/var/lib/cfengine"
> <Directory "/var/lib/cfengine">
>     Options Indexes FollowSymLinks
>     AllowOverride None
>     Order allow,deny
>     Allow from all
> </Directory>
> IndexOptions +FancyIndexing +VersionSort +NameWidth=*

2. Populate files:

> [root@build-cfengine cfengine]# pwd
> /var/lib/cfengine
> 
> [root@build-cfengine cfengine]# ls -al *
> -rw-r--r--  1 root root 6478 Aug  8 17:22 cfagent.conf
> -rw-r--r--  1 root root 1174 Aug  2 14:06 README
> 
> inputs:
> total 36
> drwxr-xr-x  2 root root 4096 Aug  8 15:06 .
> drwxr-xr-x  4 root root 4096 Aug  8 17:22 ..
> -rw-r--r--  1 root root 6478 Jul 20 00:16 cfagent.conf
> -rw-------  1 root root  328 Jun  9 18:08 cfservd.conf
> 
> root:
> total 72
> drwxr-xr-x  2 root root 4096 Jul 26 13:14 .
> drwxr-xr-x  4 root root 4096 Aug  8 17:22 ..
> -rw-r--r--  1 root root   82 Jul 26 13:14 exports
> -rw-r--r--  1 root root 1713 Jun  9 18:08 nsswitch.conf
> -rw-r--r--  1 root root  421 Jun  9 18:08 ntp.conf
> -rw-------  1 root root 2491 Jun  9 18:08 sshd_config
> -rw-r--r--  1 root root   42 Jun  9 18:08 step-tickers
> -r--r-----  1 root root 1828 Jul 26 12:16 sudoers
> -rw-r--r--  1 root root  605 Jul 19 23:40 yp.conf

3. Access host via HTTP:

 http://cfengine/
 http://cfengine/inputs
 http://cfengine/root
  
Actual results:

 cfangent.conf appears in listing of http://cfengine/
 cfangent.conf does NOT appear in listing of  http://cfengine/inputs

Expected results:

 The index of http://cfengine/inputs should contain both files (cfservd.conf &
cfagent.conf).

Additional info:
 /var/lib/cfengine/cfagent.conf and /var/lib/cfengine/inputs/cfagent.conf are
identical: They have the same contents and the same permissions - one is a copy
of the other.

Comment 1 eric pretorious 2006-08-09 01:07:46 UTC
This problem appears to be specific to the full path
/var/lib/cfengine/inputs/cfagent: If I change anything about the path, the file
appears correctly in the index:

If I copy /var/lib/cfengine/inputs/cfagent.conf to foobar, foobar appears in the
index of /var/lib/cfengine/inputs.

If I copy both subdirectories (/var/lib/cfengine/inputs and
/var/lib/cfengine/root) to /var/www/html and change DocumentRoot to
/var/www/html, the contents of the /var/lib/cfengine/inputs subdirectory display
correctly. i.e., http://cfengine/inputs/ shows that there are two files in the
directory: cfagent.conf & cfservd.conf.

Comment 2 eric pretorious 2006-08-09 01:12:25 UTC
(In reply to comment #1)
> If I copy both subdirectories (/var/lib/cfengine/inputs and
> /var/lib/cfengine/root) to /var/www/html and change DocumentRoot to
> /var/www/html, the contents of the /var/lib/cfengine/inputs subdirectory display
> correctly. i.e., http://cfengine/inputs/ shows that there are two files in the
> directory: cfagent.conf & cfservd.conf.

CORRECTION
...the contents of the /var/www/html/inputs subdirectory display correctly...

Comment 3 eric pretorious 2006-08-09 17:57:29 UTC
Created attachment 133862 [details]
Screenshot

console output displaying auditd output:

audit(1155146649.340:47): avc: denied { getaatr } for pid=5401 comm="httpd"
name="cfagent.conf" dev=sda3 ino=1994982 scontext=root:system_r:httpd_t
tcontext=root:object_r:tmp_t tclass=file

Comment 4 eric pretorious 2006-08-10 17:46:48 UTC
Please change resolution to "NOTABUG": Editing /etc/sysconfig/security
("SELINUX=disabled") and rebooting the server fixed this mysterious error.

Comment 5 Joe Orton 2006-08-14 14:50:53 UTC
Thanks for letting us know.


Note You need to log in before you can comment on or make changes to this bug.