Bug 1747488

Summary: SELinux is preventing restorecon from 'write' accesses on the file /var/log/pcp/pmlogger/pmlogger_daily-K.log.
Product: [Fedora] Fedora Reporter: Danie de Jager <danie.dejager>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:3189e0ddbf622fa772f863769d9d78a8eed3eb9ed55162a6d6155377195ff394;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-02 17:57:44 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 Danie de Jager 2019-08-30 14:41:48 UTC
Description of problem:
SELinux is preventing restorecon from 'write' accesses on the file /var/log/pcp/pmlogger/pmlogger_daily-K.log.

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

If you believe that restorecon should be allowed write access on the pmlogger_daily-K.log file 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 'restorecon' --raw | audit2allow -M my-restorecon
# semodule -X 300 -i my-restorecon.pp

Additional Information:
Source Context                system_u:system_r:setfiles_t:s0
Target Context                system_u:object_r:pcp_log_t:s0
Target Objects                /var/log/pcp/pmlogger/pmlogger_daily-K.log [ file
                              ]
Source                        restorecon
Source Path                   restorecon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.3-43.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.2.9-200.fc30.x86_64 #1 SMP Fri
                              Aug 16 21:37:45 UTC 2019 x86_64 x86_64
Alert Count                   2
First Seen                    2019-08-30 08:29:43 SAST
Last Seen                     2019-08-30 08:29:43 SAST
Local ID                      13e00c7e-61cb-4199-b58c-2f25eef29c58

Raw Audit Messages
type=AVC msg=audit(1567146583.225:44070): avc:  denied  { write } for  pid=27683 comm="restorecon" path="/var/log/pcp/pmlogger/pmlogger_daily-K.log" dev="dm-1" ino=1995611 scontext=system_u:system_r:setfiles_t:s0 tcontext=system_u:object_r:pcp_log_t:s0 tclass=file permissive=0


Hash: restorecon,setfiles_t,pcp_log_t,file,write

Version-Release number of selected component:
selinux-policy-3.14.3-43.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.2.9-200.fc30.x86_64
type:           libreport

Potential duplicate: bug 1689141

Comment 1 Lukas Vrabec 2019-09-02 17:57:44 UTC

*** This bug has been marked as a duplicate of bug 1689141 ***