Bug 201816 - mod_autoindex misses some files
mod_autoindex misses some files
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: httpd (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-08 20:59 EDT by eric pretorious
Modified: 2008-04-09 14:28 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-14 10:50:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description eric pretorious 2006-08-08 20:59:48 EDT
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-08 21:07:46 EDT
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-08 21:12:25 EDT
(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 13:57:29 EDT
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 13:46:48 EDT
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 10:50:53 EDT
Thanks for letting us know.

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