Bug 1778449 - SELinux is preventing restorecon from 'write' accesses on the файл /var/log/pcp/pmlogger/pmlogger_daily-K.log.
Summary: SELinux is preventing restorecon from 'write' accesses on the файл /var/log/p...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3189e0ddbf622fa772f863769d9...
: 1772198 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-01 08:52 UTC by Фукидид
Modified: 2020-11-24 20:16 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 20:16:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Фукидид 2019-12-01 08:52:40 UTC
Description of problem:
SELinux is preventing restorecon from 'write' accesses on the файл /var/log/pcp/pmlogger/pmlogger_daily-K.log.

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

Если вы считаете, что restorecon должно быть разрешено write доступ к pmlogger_daily-K.log file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
разрешить этот доступ сейчас, выполнив: # 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                          <Неизвестно>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.4-40.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.12-300.fc31.x86_64 #1 SMP Thu
                              Nov 21 22:52:07 UTC 2019 x86_64 x86_64
Alert Count                   2
First Seen                    2019-12-01 11:51:23 +03
Last Seen                     2019-12-01 11:51:23 +03
Local ID                      f00a30b1-ca6c-4a6a-b01c-692875145eb8

Raw Audit Messages
type=AVC msg=audit(1575190283.283:309): avc:  denied  { write } for  pid=5795 comm="restorecon" path="/var/log/pcp/pmlogger/pmlogger_daily-K.log" dev="dm-1" ino=1186456 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.4-40.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.11.3
hashmarkername: setroubleshoot
kernel:         5.3.12-300.fc31.x86_64
type:           libreport

Potential duplicate: bug 1747488

Comment 2 Lukas Vrabec 2019-12-02 12:25:58 UTC
*** Bug 1772198 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Berk 2019-12-02 17:15:59 UTC
Hi LukasV,

Yes, we call it in our logger script to ensure the proper contexts for our logging files:

https://github.com/performancecopilot/pcp/blob/master/src/pmlogger/pmlogger_daily.sh#L680-L683

Comment 4 Ben Cotton 2020-11-03 17:24:00 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
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 EOL if it remains open with a
Fedora 'version' of '31'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 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 this bug is closed as described in the policy above.

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 5 Ben Cotton 2020-11-24 20:16:08 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 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. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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.