Bug 865677 - SELinux is preventing /usr/bin/mongod from 'getattr' accesses on the filesystem /.
SELinux is preventing /usr/bin/mongod from 'getattr' accesses on the filesyst...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-10-12 02:09 EDT by Nikolay Vladimirov
Modified: 2012-12-20 11:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-20 11:07:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-10-12 02:09 EDT, Nikolay Vladimirov
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-10-12 02:09 EDT, Nikolay Vladimirov
no flags Details

  None (edit)
Description Nikolay Vladimirov 2012-10-12 02:09:33 EDT
Description of problem:
Just ran yum update and during the mongo upgrade this happened. 

Additional info:
libreport version: 2.0.16
kernel:         3.5.4-1.fc17.x86_64

:SELinux is preventing /usr/bin/mongod from 'getattr' accesses on the filesystem /.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that mongod should be allowed getattr access on the  filesystem by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep mongod /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                system_u:system_r:mongod_t:s0
:Target Context                system_u:object_r:fs_t:s0
:Target Objects                / [ filesystem ]
:Source                        mongod
:Source Path                   /usr/bin/mongod
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           mongodb-server-2.2.0-6.fc17.x86_64
:Target RPM Packages           filesystem-3-2.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-153.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.4-1.fc17.x86_64 #1 SMP Mon Sep
:                              17 15:03:59 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-10-12 09:04:19 EEST
:Last Seen                     2012-10-12 09:04:19 EEST
:Local ID                      f8625a39-bea7-42bb-a24b-a6db290c87c8
:Raw Audit Messages
:type=AVC msg=audit(1350021859.791:1728): avc:  denied  { getattr } for  pid=5566 comm="mongod" name="/" dev="sda2" ino=2 scontext=system_u:system_r:mongod_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem
:type=SYSCALL msg=audit(1350021859.791:1728): arch=x86_64 syscall=statfs success=no exit=EACCES a0=1fe88d8 a1=7fff1771d570 a2=1fe88c0 a3=7fff1771d430 items=0 ppid=5565 pid=5566 auid=4294967295 uid=992 gid=988 euid=992 suid=992 fsuid=992 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm=mongod exe=/usr/bin/mongod subj=system_u:system_r:mongod_t:s0 key=(null)
:Hash: mongod,mongod_t,fs_t,filesystem,getattr
:#============= mongod_t ==============
:allow mongod_t fs_t:filesystem getattr;
:audit2allow -R
:#============= mongod_t ==============
:allow mongod_t fs_t:filesystem getattr;
Comment 1 Nikolay Vladimirov 2012-10-12 02:09:50 EDT
Created attachment 625804 [details]
File: type
Comment 2 Nikolay Vladimirov 2012-10-12 02:09:52 EDT
Created attachment 625805 [details]
File: hashmarkername
Comment 3 Daniel Walsh 2012-10-12 06:04:55 EDT
cb6da25425ba18320c6c1af90fc06c91419e3da2 needs to be back ported.
Comment 4 Michael Scherer 2012-10-16 15:26:49 EDT
I just installed and tried to start mongodb

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)
Comment 5 Miroslav Grepl 2012-10-17 02:48:51 EDT

commit 0f73afee1e6be2883fd70bb1cb3211057ed81916
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Wed Oct 17 08:48:35 2012 +0200

    Allow mongodb_t to getattr on all file systems
Comment 6 Fedora Update System 2012-10-17 08:35:58 EDT
selinux-policy-3.10.0-156.fc17 has been submitted as an update for Fedora 17.
Comment 7 Fedora Update System 2012-10-17 20:27:17 EDT
Package selinux-policy-3.10.0-156.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-156.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-12-20 11:07:45 EST
selinux-policy-3.10.0-156.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.