Bug 966315

Summary: SELinux is preventing /usr/sbin/httpd from 'read' accesses on the file colchange.cgi.
Product: [Fedora] Fedora Reporter: Moez Roy <moez.roy>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7ecb5d909caa6b22d6fcf5c8e330d3b674f680f88599a8680877cf59623adca4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-23 08:16:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Moez Roy 2013-05-23 03:32:24 UTC
Description of problem:
SELinux is preventing /usr/sbin/httpd from 'read' accesses on the file colchange.cgi.

*****  Plugin catchall_boolean (89.3 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.
You can read 'user_selinux' man page for more details.
Do
setsebool -P httpd_read_user_content 1

*****  Plugin catchall (11.6 confidence) suggests  ***************************

If you believe that httpd should be allowed read access on the colchange.cgi file 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 /usr/sbin/httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                colchange.cgi [ file ]
Source                        /usr/sbin/httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           httpd-2.4.4-3.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-96.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-200.fc18.x86_64 #1 SMP Mon
                              May 13 13:59:47 UTC 2013 x86_64 x86_64
Alert Count                   11
First Seen                    2013-05-22 20:30:13 PDT
Last Seen                     2013-05-22 20:30:14 PDT
Local ID                      df5ce1e8-a1ca-4e7b-b87b-75ac1e97b4f1

Raw Audit Messages
type=AVC msg=audit(1369279814.11:456): avc:  denied  { read } for  pid=2394 comm="/usr/sbin/httpd" name="colchange.cgi" dev="sda2" ino=1319059 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1369279814.11:456): arch=x86_64 syscall=open success=no exit=EACCES a0=7ff582268c08 a1=80000 a2=1b6 a3=7ff582268bd8 items=0 ppid=2389 pid=2394 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 ses=4294967295 tty=(none) comm=/usr/sbin/httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: /usr/sbin/httpd,httpd_t,user_home_t,file,read

audit2allow

#============= httpd_t ==============
#!!!! This avc can be allowed using the boolean 'httpd_read_user_content'

allow httpd_t user_home_t:file read;

audit2allow -R
require {
	type httpd_t;
}

#============= httpd_t ==============
userdom_mmap_user_home_content_files(httpd_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-05-23 08:16:33 UTC

*** This bug has been marked as a duplicate of bug 966313 ***