Bug 1570416 - SELinux is preventing /usr/lib/systemd/systemd-journald from 'getattr' accesses on the file /var/log/journal/d35a0c08f044479785155608609bd598/user-1003.journal.
Summary: SELinux is preventing /usr/lib/systemd/systemd-journald from 'getattr' access...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:abbed5d768fbb13da47e8f33a8d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-22 17:37 UTC by Mike Kwong
Modified: 2018-04-26 15:55 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-04-26 15:55:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mike Kwong 2018-04-22 17:37:58 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-journald from 'getattr' accesses on the file /var/log/journal/d35a0c08f044479785155608609bd598/user-1003.journal.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/log/journal/d35a0c08f044479785155608609bd598/user-1003.journal default label should be var_log_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/log/journal/d35a0c08f044479785155608609bd598/user-1003.journal

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that systemd-journald should be allowed getattr access on the user-1003.journal 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 'systemd-journal' --raw | audit2allow -M my-systemdjournal
# semodule -X 300 -i my-systemdjournal.pp

Additional Information:
Source Context                system_u:system_r:syslogd_t:s0
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /var/log/journal/d35a0c08f044479785155608609bd598/
                              user-1003.journal [ file ]
Source                        systemd-journal
Source Path                   /usr/lib/systemd/systemd-journald
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.30.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.17-300.fc27.x86_64 #1 SMP Thu
                              Apr 12 18:19:17 UTC 2018 x86_64 x86_64
Alert Count                   874
First Seen                    2017-09-03 13:56:04 PDT
Last Seen                     2018-04-22 10:34:49 PDT
Local ID                      91cd2140-7819-4977-bdb9-e5baff8508dc

Raw Audit Messages
type=AVC msg=audit(1524418489.325:347): avc:  denied  { getattr } for  pid=971 comm="systemd-journal" path="/var/log/journal/d35a0c08f044479785155608609bd598/user-1003.journal" dev="dm-0" ino=4116321 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0


Hash: systemd-journal,syslogd_t,unlabeled_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-283.30.fc27.noarch

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

Potential duplicate: bug 1284064

Comment 1 Lukas Vrabec 2018-04-26 15:55:22 UTC
*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/log/journal/d35a0c08f044479785155608609bd598/user-1003.journal default label should be var_log_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/log/journal/d35a0c08f044479785155608609bd598/user-1003.journal


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