Bug 675566

Summary: SELinux is preventing /usr/sbin/httpd from 'getattr' accesses on the directory /home/vinayak.
Product: [Fedora] Fedora Reporter: Vinayak Kumbhakern <kvinayaks>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:b363d81c03607674cc00125f5e3eaa975758a4b1dea34e9b683e20ce284f3274
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-07 11:09:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vinayak Kumbhakern 2011-02-06 17:55:39 UTC
SELinux is preventing /usr/sbin/httpd from 'getattr' accesses on the directory /home/vinayak.

*****  Plugin catchall_boolean (47.5 confidence) suggests  *******************

If you want to allow httpd to read user content
Then you must tell SELinux about this by enabling the 'httpd_read_user_content' boolean.
Do
setsebool -P httpd_read_user_content 1

*****  Plugin catchall_boolean (47.5 confidence) suggests  *******************

If you want to allow httpd to read home directories
Then you must tell SELinux about this by enabling the 'httpd_enable_homedirs' boolean.
Do
setsebool -P httpd_enable_homedirs 1

*****  Plugin catchall (6.38 confidence) suggests  ***************************

If you believe that httpd should be allowed getattr access on the vinayak directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:httpd_t:s0
Target Context                unconfined_u:object_r:user_home_dir_t:s0
Target Objects                /home/vinayak [ dir ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           httpd-2.2.17-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-28.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-74.fc14.i686 #1 SMP
                              Thu Dec 23 16:17:40 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Sun 06 Feb 2011 12:43:55 PM EST
Last Seen                     Sun 06 Feb 2011 12:43:55 PM EST
Local ID                      48b034c2-e581-4e05-aa87-33065a25f82d

Raw Audit Messages
type=AVC msg=audit(1297014235.366:23966): avc:  denied  { getattr } for  pid=26417 comm="httpd" path="/home/vinayak" dev=sda5 ino=131090 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=dir


type=SYSCALL msg=audit(1297014235.366:23966): arch=i386 syscall=lstat64 success=yes exit=0 a0=1fae7c8 a1=bfb7a350 a2=61bff4 a3=2008171 items=0 ppid=26411 pid=26417 auid=500 uid=48 gid=488 euid=48 suid=48 fsuid=48 egid=488 sgid=488 fsgid=488 tty=(none) ses=5 comm=httpd exe=/usr/sbin/httpd subj=unconfined_u:system_r:httpd_t:s0 key=(null)

Hash: httpd,httpd_t,user_home_dir_t,dir,getattr

audit2allow

#============= httpd_t ==============
#!!!! This avc is allowed in the current policy

allow httpd_t user_home_dir_t:dir getattr;

audit2allow -R

#============= httpd_t ==============
#!!!! This avc is allowed in the current policy

allow httpd_t user_home_dir_t:dir getattr;

Comment 1 Miroslav Grepl 2011-02-07 11:09:09 UTC
#============= httpd_t ==============
#!!!! This avc is allowed in the current policy

allow httpd_t user_home_dir_t:dir getattr;