Bug 1529831

Summary: SELinux is preventing mpd from 'getattr' accesses on the directory /root/.config.
Product: [Fedora] Fedora Reporter: bugzilla
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:e2a29d135cba069180fd364a8190410cf78a7c37b1d9e70594776c6c5e05cf64;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-05 12:55:25 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 bugzilla 2017-12-30 02:47:16 UTC
Description of problem:
This error occurs because mpd is attempting to access root/.config
SELinux is preventing mpd from 'getattr' accesses on the directory /root/.config.

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

If you believe that mpd should be allowed getattr access on the .config 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:
# ausearch -c 'mpd' --raw | audit2allow -M my-mpd
# semodule -X 300 -i my-mpd.pp

Additional Information:
Source Context                system_u:system_r:mpd_t:s0
Target Context                unconfined_u:object_r:config_home_t:s0
Target Objects                /root/.config [ dir ]
Source                        mpd
Source Path                   mpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-158.15.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.7-202.fc23.x86_64 #1 SMP Tue
                              Jun 28 18:22:51 UTC 2016 x86_64 x86_64
Alert Count                   55
First Seen                    2016-03-20 16:59:19 EDT
Last Seen                     2016-07-12 14:36:10 EDT
Local ID                      1dc52a45-5a6c-42ae-b119-a2800b00c109

Raw Audit Messages
type=AVC msg=audit(1468348570.212:246): avc:  denied  { getattr } for  pid=1100 comm="mpd" path="/root/.config" dev="sda1" ino=12062417 scontext=system_u:system_r:mpd_t:s0 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=dir permissive=0


Hash: mpd,mpd_t,config_home_t,dir,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-158.15.fc23.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.8-300.fc27.x86_64
type:           libreport

Potential duplicate: bug 1325502

Comment 1 Lukas Vrabec 2018-01-05 12:55:25 UTC
You're using wrong path for config files. Please use your home dir: HOME_DIR/.mpd/config. 

This will fix your issue.