Bug 806510

Summary: SELinux is preventing /usr/sbin/logrotate from 'read' accesses on the file /etc/logrotate.d/parallels.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:88d5eb95278dce37378a5cb749353f8252bb29ae56caedef3beae5a2b7ef01ad
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-26 10:49:40 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 Mikhail 2012-03-24 10:06:34 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-1.fc17.i686.PAE
reason:         SELinux is preventing /usr/sbin/logrotate from 'read' accesses on the file /etc/logrotate.d/parallels.
time:           Sat 24 Mar 2012 04:06:26 PM YEKT

description:
:SELinux is preventing /usr/sbin/logrotate from 'read' accesses on the file /etc/logrotate.d/parallels.
:
:*****  Plugin restorecon (99.5 confidence) suggests  *************************
:
:If you want to fix the label. 
:/etc/logrotate.d/parallels default label should be etc_t.
:Then you can run restorecon.
:Do
:# /sbin/restorecon -v /etc/logrotate.d/parallels
:
:*****  Plugin catchall (1.49 confidence) suggests  ***************************
:
:If you believe that logrotate should be allowed read access on the parallels 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 logrotate /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:user_tmp_t:s0
:Target Objects                /etc/logrotate.d/parallels [ file ]
:Source                        logrotate
:Source Path                   /usr/sbin/logrotate
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           logrotate-3.8.1-3.fc17.i686
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-95.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.0-0.rc6.git0.2.fc17.i686.PAE #1 SMP
:                              Mon Mar 5 17:02:45 UTC 2012 i686 i686
:Alert Count                   2
:First Seen                    Mon 19 Mar 2012 03:32:01 PM YEKT
:Last Seen                     Tue 20 Mar 2012 10:39:01 AM YEKT
:Local ID                      13e2da4c-632c-4588-a463-98cf20bace19
:
:Raw Audit Messages
:type=AVC msg=audit(1332218341.558:118): avc:  denied  { read } for  pid=2494 comm="logrotate" name="parallels" dev="sda2" ino=273261 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1332218341.558:118): arch=i386 syscall=open success=no exit=EACCES a0=8a500d0 a1=8000 a2=0 a3=5 items=0 ppid=2492 pid=2494 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm=logrotate exe=/usr/sbin/logrotate subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)
:
:Hash: logrotate,logrotate_t,user_tmp_t,file,read
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Miroslav Grepl 2012-03-26 10:49:40 UTC
You need to fix labeling for /etc/logrotate.d/parallels using the restorecon tool

$ restorecon -R -v /etc/logrotate.d/parallels


You moved it from /tmp directory.