Bug 831184 - SELinux is preventing /usr/bin/mongod from 'add_name' accesses on the directory mongod.lock.
SELinux is preventing /usr/bin/mongod from 'add_name' accesses on the directo...
Product: Fedora
Classification: Fedora
Component: mongodb (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nathaniel McCallum
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-12 08:30 EDT by Simone Tolotti
Modified: 2013-08-01 01:35 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-01 01:35:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Simone Tolotti 2012-06-12 08:30:42 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.0-1.fc17.x86_64
time:           mar 12 giu 2012 14:30:12 CEST

:SELinux is preventing /usr/bin/mongod from 'add_name' accesses on the directory mongod.lock.
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:If you want to allow mongod to have add_name access on the mongod.lock directory
:Then e' necessario modificare l'etichetta su mongod.lock
:# semanage fcontext -a -t TIPO_FILE 'mongod.lock'
:dove TIPO_FILE è uno dei seguenti: tmp_t, var_run_t, mongod_var_lib_t, mongod_var_run_t, mongod_log_t, mongod_tmp_t, root_t. 
:Quindi eseguire: 
:restorecon -v 'mongod.lock'
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:If si crede che mongod dovrebbe avere possibilità di accesso add_name sui mongod.lock directory in modo predefinito.
:Then si dovrebbe riportare il problema come bug.
:E' possibile generare un modulo di politica locale per consentire questo accesso.
:consentire questo accesso per il momento eseguendo:
:# 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:var_lib_t:s0
:Target Objects                mongod.lock [ dir ]
:Source                        mongod
:Source Path                   /usr/bin/mongod
:Port                          <Sconosciuto>
:Host                          (removed)
:Source RPM Packages           mongo-10gen-server-2.0.6-mongodb_1.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-128.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.0-1.fc17.x86_64 #1
:                              SMP Sun Jun 3 06:35:17 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    mar 12 giu 2012 14:29:29 CEST
:Last Seen                     mar 12 giu 2012 14:29:29 CEST
:Local ID                      05747315-5b79-4905-a176-8eb9a124f741
:Raw Audit Messages
:type=AVC msg=audit(1339504169.51:92): avc:  denied  { add_name } for  pid=2362 comm="mongod" name="mongod.lock" scontext=system_u:system_r:mongod_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir
:type=SYSCALL msg=audit(1339504169.51:92): arch=x86_64 syscall=open success=no exit=EACCES a0=300a2a8 a1=42 a2=1ff a3=39 items=0 ppid=1 pid=2362 auid=4294967295 uid=992 gid=989 euid=992 suid=992 fsuid=992 egid=989 sgid=989 fsgid=989 tty=(none) ses=4294967295 comm=mongod exe=/usr/bin/mongod subj=system_u:system_r:mongod_t:s0 key=(null)
:Hash: mongod,mongod_t,var_lib_t,dir,add_name
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
Comment 1 Daniel Walsh 2012-06-12 21:09:07 EDT
Is mongod.lock in a /var/lib directory?

Does restorecon -R -v /var/lib 

Change any mongo files/directories labels?
Comment 2 Fedora End Of Life 2013-07-03 21:17:04 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 3 Fedora End Of Life 2013-08-01 01:35:38 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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