Bug 841672 - SELinux is preventing /usr/sbin/squid from 'read' accesses on the file /var/log/squid/cache.log.
SELinux is preventing /usr/sbin/squid from 'read' accesses on the file /var/l...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
: 841673 841674 841675 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-07-19 16:15 EDT by zic
Modified: 2012-07-19 18:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-19 17:59:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description zic 2012-07-19 16:15:25 EDT
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

: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.
: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-
: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 17:59:49 EDT
# matchpathcon /var/log/squid/cache.log
/var/log/squid/cache.log	system_u:object_r:squid_log_t:s


# restorecon -R -v /var/log/squid/cache.log
Comment 2 Miroslav Grepl 2012-07-19 18:00:57 EDT
Actually execute

# restorecon -R -v /var/log
Comment 3 Miroslav Grepl 2012-07-19 18:01:08 EDT
*** Bug 841673 has been marked as a duplicate of this bug. ***
Comment 4 Miroslav Grepl 2012-07-19 18:01:12 EDT
*** Bug 841674 has been marked as a duplicate of this bug. ***
Comment 5 Miroslav Grepl 2012-07-19 18:01:16 EDT
*** 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.