Bug 1245295
| Summary: | SELinux is preventing httpd from 'name_connect' accesses on the tcp_socket port 3306. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dillon Gilmore <dillon> | 
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | 
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | 
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 22 | CC: | dominick.grift, dwalsh, lvrabec, mgrepl, plautrba | 
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | abrt_hash:f55faa448aa60c909e2400fdb28ed34168f46535517cfb66155099bab1ca028f | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-28 09:02:32 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: | |||
***** Plugin catchall_boolean (47.5 confidence) suggests ****************** If you want to allow httpd to can network connect db Then you must tell SELinux about this by enabling the 'httpd_can_network_connect_db' boolean. You can read 'None' man page for more details. Do setsebool -P httpd_can_network_connect_db 1  | 
Description of problem: Visited a webpage configured in Apache. SELinux is preventing httpd from 'name_connect' accesses on the tcp_socket port 3306. ***** Plugin catchall_boolean (47.5 confidence) suggests ****************** If you want to allow httpd to can network connect Then you must tell SELinux about this by enabling the 'httpd_can_network_connect' boolean. You can read 'None' man page for more details. Do setsebool -P httpd_can_network_connect 1 ***** Plugin catchall_boolean (47.5 confidence) suggests ****************** If you want to allow httpd to can network connect db Then you must tell SELinux about this by enabling the 'httpd_can_network_connect_db' boolean. You can read 'None' man page for more details. Do setsebool -P httpd_can_network_connect_db 1 ***** Plugin catchall (6.38 confidence) suggests ************************** If you believe that httpd should be allowed name_connect access on the port 3306 tcp_socket 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 system_u:system_r:httpd_t:s0 Target Context system_u:object_r:mysqld_port_t:s0 Target Objects port 3306 [ tcp_socket ] Source httpd Source Path httpd Port 3306 Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.13.1-128.6.fc22.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.0.8-300.fc22.x86_64 #1 SMP Fri Jul 10 21:04:56 UTC 2015 x86_64 x86_64 Alert Count 3 First Seen 2015-07-21 09:55:57 PDT Last Seen 2015-07-21 09:57:22 PDT Local ID d862ce03-1bf1-44fa-a9b1-e481fe13bc1e Raw Audit Messages type=AVC msg=audit(1437497842.324:844): avc: denied { name_connect } for pid=10925 comm="httpd" dest=3306 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socket permissive=0 Hash: httpd,httpd_t,mysqld_port_t,tcp_socket,name_connect Version-Release number of selected component: selinux-policy-3.13.1-128.6.fc22.noarch Additional info: reporter: libreport-2.6.1 hashmarkername: setroubleshoot kernel: 4.0.8-300.fc22.x86_64 type: libreport Potential duplicate: bug 872624