Bug 1032090

Summary: SELinux is preventing /usr/bin/bash from 'write' accesses on the directory /.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:093b0ba8348c8c51c92cda90681703969ce60225a0614e6303c6cfa8f4473059
Fixed In Version: selinux-policy-3.12.1-105.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-14 02:53:48 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 Mikhail 2013-11-19 14:29:02 UTC
Description of problem:
SELinux is preventing /usr/bin/bash from 'write' accesses on the directory /.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow daemons to dump core
Then you must tell SELinux about this by enabling the 'daemons_dump_core' boolean.
You can read 'None' man page for more details.
Do
setsebool -P daemons_dump_core 1

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

If you believe that bash should be allowed write access on the  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 mysqld_safe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:mysqld_safe_t:s0
Target Context                system_u:object_r:root_t:s0
Target Objects                / [ dir ]
Source                        mysqld_safe
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.45-4.fc20.i686
Target RPM Packages           filesystem-3.2-19.fc20.i686
Policy RPM                    selinux-policy-3.12.1-90.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.0-2.fc21.i686+PAE #1 SMP Sat
                              Nov 9 21:31:51 UTC 2013 i686 i686
Alert Count                   3
First Seen                    2013-11-19 20:19:06 YEKT
Last Seen                     2013-11-19 20:19:24 YEKT
Local ID                      52f5b240-ec79-4a83-a29d-58e2be8fe2cf

Raw Audit Messages
type=AVC msg=audit(1384870764.966:934): avc:  denied  { write } for  pid=32205 comm="mysqld_safe" name="/" dev="sda1" ino=2 scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=dir


type=SYSCALL msg=audit(1384870764.966:934): arch=i386 syscall=faccessat success=no exit=EACCES a0=ffffff9c a1=8cf9aa0 a2=2 a3=200 items=0 ppid=32199 pid=32205 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=1 tty=(none) comm=mysqld_safe exe=/usr/bin/bash subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)

Hash: mysqld_safe,mysqld_safe_t,root_t,dir,write

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.12.0-2.fc21.i686+PAE
type:           libreport

Potential duplicate: bug 906985

Comment 1 Mikhail 2013-11-19 14:33:47 UTC
Description of problem:
This occurs when I start MariaDB 10.0.6 installed from MariaDB reporitory

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.12.0-2.fc21.i686+PAE
type:           libreport

Comment 2 Daniel Walsh 2013-11-19 14:45:59 UTC
Looks like this is dontaudited in selinux-policy-3.13.1-4.fc21

Comment 3 Mikhail 2013-11-20 09:52:38 UTC
This can be ported to f20?

Comment 4 Miroslav Grepl 2013-11-25 14:22:23 UTC
Ok, this is an access check.

Comment 5 Miroslav Grepl 2013-11-25 14:57:12 UTC
Added to rawhide/F20.

Comment 6 Fedora Update System 2013-11-27 08:15:09 UTC
selinux-policy-3.12.1-105.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-105.fc20

Comment 7 Fedora Update System 2013-11-27 16:13:20 UTC
Package selinux-policy-3.12.1-105.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-105.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22285/selinux-policy-3.12.1-105.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-12-14 02:53:48 UTC
selinux-policy-3.12.1-105.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.