Bug 688716

Summary: SELinux is preventing /bin/touch from 'open' accesses on the sock_file logging.socket.
Product: [Fedora] Fedora Reporter: Scotty Delicious <scottydelicious>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:d33441010d66fff32cb9d9f395e3061adce3fe5738d86c54f854c9fdf9245f4d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-07 19:21:52 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 Scotty Delicious 2011-03-17 19:42:27 UTC
SELinux is preventing /bin/touch from 'open' accesses on the sock_file logging.socket.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that touch should be allowed open access on the logging.socket sock_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 touch /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:httpd_tmp_t:s0
Target Objects                logging.socket [ sock_file ]
Source                        touch
Source Path                   /bin/touch
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.5-7.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux T410s 2.6.35.11-83.fc14.x86_64 #1 SMP Mon
                              Feb 7 07:06:44 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Thu 17 Mar 2011 01:30:00 PM CDT
Last Seen                     Thu 17 Mar 2011 01:30:00 PM CDT
Local ID                      ae4ce312-b193-4afe-b91b-a40f3c36baf9

Raw Audit Messages
type=AVC msg=audit(1300386600.177:21224): avc:  denied  { open } for  pid=29408 comm="touch" name="logging.socket" dev=dm-1 ino=283000 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:httpd_tmp_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1300386600.177:21224): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff79f20f66 a1=941 a2=1b6 a3=0 items=0 ppid=29407 pid=29408 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm=touch exe=/bin/touch subj=unconfined_u:system_r:httpd_t:s0 key=(null)

Hash: touch,httpd_t,httpd_tmp_t,sock_file,open

audit2allow

#============= httpd_t ==============
allow httpd_t httpd_tmp_t:sock_file open;

audit2allow -R

#============= httpd_t ==============
allow httpd_t httpd_tmp_t:sock_file open;

Comment 1 Miroslav Grepl 2011-03-18 08:09:09 UTC
Do you know which apache module causes this?

Comment 2 Scotty Delicious 2011-03-20 22:14:35 UTC
(In reply to comment #1)
> Do you know which apache module causes this?

It is the phusion passenger module for nginx.

Comment 3 Daniel Walsh 2011-03-21 22:19:25 UTC
I would think this would be ok.


I would prever if Phusion passenger module would open this logging.socket in /var/run 

Fixed in selinux-policy-3.9.16-6.fc15

Comment 4 Miroslav Grepl 2011-03-23 11:41:37 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Do you know which apache module causes this?
> 
> It is the phusion passenger module for nginx.

Scotty,
any chance you could try to setup passenger according to

http://blogs.fedoraproject.org/wp/mgrepl/2011/02/03/does-a-new-mod_rails-aka-passenger-work-with-the-current-fedora-selinux-policy/