Bug 1321467 - SELinux is preventing apcupsd from 'open' accesses on the file /var/log/apcupsd.events.
Summary: SELinux is preventing apcupsd from 'open' accesses on the file /var/log/apcup...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:bff6802401c01f52fc1749a3136...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-27 16:06 UTC by hx
Modified: 2016-03-28 18:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-28 18:15:50 UTC
Type: ---


Attachments (Terms of Use)

Description hx 2016-03-27 16:06:41 UTC
Description of problem:
SELinux is preventing apcupsd from 'open' accesses on the file /var/log/apcupsd.events.

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

If you want to fix the label. 
/var/log/apcupsd.events default label should be apcupsd_log_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/log/apcupsd.events

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

If you believe that apcupsd should be allowed open access on the apcupsd.events 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:
# grep apcupsd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:apcupsd_t:s0
Target Context                unconfined_u:object_r:var_log_t:s0
Target Objects                /var/log/apcupsd.events [ file ]
Source                        apcupsd
Source Path                   apcupsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-158.11.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.4.6-300.fc23.x86_64 #1 SMP Wed
                              Mar 16 22:10:37 UTC 2016 x86_64 x86_64
Alert Count                   3
First Seen                    2016-03-27 18:55:45 EEST
Last Seen                     2016-03-27 19:04:10 EEST
Local ID                      36d2ceb9-83a3-47fb-a3f5-2afd7ee6d028

Raw Audit Messages
type=AVC msg=audit(1459094650.277:543): avc:  denied  { open } for  pid=9043 comm="apcupsd" path="/var/log/apcupsd.events" dev="dm-1" ino=1058432 scontext=system_u:system_r:apcupsd_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=file permissive=1


Hash: apcupsd,apcupsd_t,var_log_t,file,open

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

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.4.6-300.fc23.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-03-28 18:15:50 UTC
The troubleshoot told you what to do.


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

If you want to fix the label. 
/var/log/apcupsd.events default label should be apcupsd_log_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/log/apcupsd.events


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