Hide Forgot
Description of problem: SELinux is preventing httpd from autofs mounting files system. Without SELinux enabled the httpd mount of NFS resources work as expected and works as expected if mount is done manually (with 'cd' into /net/server...) Home dir NFS resources from same server works with and without SELinux enabled. # getsebool use_nfs_home_dirs use_nfs_home_dirs --> on # getsebool httpd_use_nfs httpd_use_nfs --> on # grep DocumentRoot /etc/httpd/conf/httpd.conf DocumentRoot /net/shadow/export/iraid/website/client-site Version-Release number of selected component (if applicable): How reproducible: Always with SELINUX=enforcing Apache/autofs configuration works and has been tested with SELINUX=permissive with no issues and as expected. Steps to Reproduce: 1. disable selinux, reboot 2. config apache and autofs for /net/shadow/... resources then verify OK 3. enable selinux, reboot 2. mount | grep website ...nothing mounted as it should be 2. service httpd start Starting httpd: Syntax error on line 295 of /etc/httpd/conf/httpd.conf: DocumentRoot must be a directory [FAILED] 3. cd /net/shadow/export/iraid/website/ 4. mount | grep website shadow:/export/iraid/website on /net/shadow/export/iraid/website type nfs (rw,nosuid,nodev,intr,sloppy,vers=4,addr=XXX.XXX.XXX.XXX,clientaddr=XXX.XX.XXX.XXX) 5. service httpd start Starting httpd: 6. service httpd status httpd (pid 3474) is running... Actual results: Expected results: Additional info: audio.log report generated then httpd is started then fails: type=AVC msg=audit(1300043363.272:71): avc: denied { read } for pid=3165 comm="httpd" name="/" dev=autofs ino=20368 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:autofs_t:s0 tclass=dir type=SYSCALL msg=audit(1300043363.272:71): arch=c000003e syscall=4 success=no exit=-13 a0=7f20c9133760 a1=7fff7e2f94f0 a2=7fff7e2f94f0 a3=7fff7e2f93d0 items=0 ppid=3163 pid=3165 auid=5076 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=3 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
fs_list_auto_mountpoints(httpd_*_t) Should be added to all nfs boolean blocks.
yes, will add it.
Fixed in selinux-policy-3.7.19-79.el6
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0526.html