Bug 841672 - SELinux is preventing /usr/sbin/squid from 'read' accesses on the file /var/log/squid/cache.log.
Summary: SELinux is preventing /usr/sbin/squid from 'read' accesses on the file /var/l...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:7ca0e350943fbfec996c5a4f83e...
: 841673 841674 841675 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-19 20:15 UTC by zic
Modified: 2012-07-19 22:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-19 21:59:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description zic 2012-07-19 20:15:25 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.4-5.fc17.x86_64
time:           Fri 20 Jul 2012 05:15:00 AM JST

description:
:SELinux is preventing /usr/sbin/squid from 'read' accesses on the file /var/log/squid/cache.log.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that squid should be allowed read access on the cache.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:
:# grep squid /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:squid_t:s0
:Target Context                system_u:object_r:var_log_t:s0
:Target Objects                /var/log/squid/cache.log [ file ]
:Source                        squid
:Source Path                   /usr/sbin/squid
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           squid-3.2.0.16-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-137.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed).Tahri 3.4.4-5.fc17.x86_64 #1 SMP Thu
:                              Jul 5 20:20:59 UTC 2012 x86_64 x86_64
:Alert Count                   35
:First Seen                    Fri 20 Jul 2012 04:57:50 AM JST
:Last Seen                     Fri 20 Jul 2012 05:13:34 AM JST
:Local ID                      603a4628-61dc-4147-911e-d9ffebee13cd
:
:Raw Audit Messages
:type=AVC msg=audit(1342728814.595:277439): avc:  denied  { read } for  pid=11304 comm="squid" name="cache.log" dev="md114" ino=151 scontext=system_u:system_r:squid_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1342728814.595:277439): arch=x86_64 syscall=open success=no exit=EACCES a0=7fa92b036130 a1=442 a2=1b6 a3=238 items=0 ppid=1 pid=11304 auid=4294967295 uid=0 gid=23 euid=23 suid=0 fsuid=23 egid=23 sgid=23 fsgid=23 tty=(none) ses=4294967295 comm=squid exe=/usr/sbin/squid subj=system_u:system_r:squid_t:s0 key=(null)
:
:Hash: squid,squid_t,var_log_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-07-19 21:59:49 UTC
# matchpathcon /var/log/squid/cache.log
/var/log/squid/cache.log	system_u:object_r:squid_log_t:s

Execute:

# restorecon -R -v /var/log/squid/cache.log

Comment 2 Miroslav Grepl 2012-07-19 22:00:57 UTC
Actually execute

# restorecon -R -v /var/log

Comment 3 Miroslav Grepl 2012-07-19 22:01:08 UTC
*** Bug 841673 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2012-07-19 22:01:12 UTC
*** Bug 841674 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Grepl 2012-07-19 22:01:16 UTC
*** Bug 841675 has been marked as a duplicate of this bug. ***


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