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.
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.
(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...
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
Please change resolution to "NOTABUG": Editing /etc/sysconfig/security ("SELINUX=disabled") and rebooting the server fixed this mysterious error.
Thanks for letting us know.