Bug 1045716 - SELinux is preventing /usr/sbin/squid from 'write' accesses on the directory /var/spool/squid.
Summary: SELinux is preventing /usr/sbin/squid from 'write' accesses on the directory ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ead05d03b2ec36ed83ebc51c878...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-21 12:58 UTC by Randy Gordey
Modified: 2014-01-02 23:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-02 23:08:07 UTC
Type: ---


Attachments (Terms of Use)

Description Randy Gordey 2013-12-21 12:58:43 UTC
Description of problem:
Install Squid to new Fedora20
SELinux is preventing /usr/sbin/squid from 'write' accesses on the directory /var/spool/squid.

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

If you want to fix the label. 
/var/spool/squid default label should be squid_cache_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/spool/squid

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

If you believe that squid should be allowed write access on the squid directory 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                unconfined_u:object_r:var_spool_t:s0
Target Objects                /var/spool/squid [ dir ]
Source                        squid
Source Path                   /usr/sbin/squid
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           squid-3.3.11-1.fc20.x86_64
Target RPM Packages           squid-3.3.11-1.fc20.x86_64
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.5-302.fc20.x86_64 #1 SMP Tue
                              Dec 17 20:42:32 UTC 2013 x86_64 x86_64
Alert Count                   5
First Seen                    2013-12-21 06:50:54 CST
Last Seen                     2013-12-21 06:51:08 CST
Local ID                      a1d66b5e-a725-4266-bcf8-21ba67ec06e0

Raw Audit Messages
type=AVC msg=audit(1387630268.222:209): avc:  denied  { write } for  pid=4999 comm="squid" name="squid" dev="dm-1" ino=1082748 scontext=system_u:system_r:squid_t:s0 tcontext=unconfined_u:object_r:var_spool_t:s0 tclass=dir


type=SYSCALL msg=audit(1387630268.222:209): arch=x86_64 syscall=open success=no exit=EACCES a0=7ff05cd64660 a1=441 a2=1a4 a3=0 items=0 ppid=4829 pid=4999 auid=4294967295 uid=23 gid=23 euid=23 suid=0 fsuid=23 egid=23 sgid=23 fsgid=23 ses=4294967295 tty=(none) comm=squid exe=/usr/sbin/squid subj=system_u:system_r:squid_t:s0 key=(null)

Hash: squid,squid_t,var_spool_t,dir,write

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.12.5-302.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-01-02 23:08:07 UTC
*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/spool/squid default label should be squid_cache_t.
Then you can run restorecon.
Do
# /sbin/restorecon -rv /var/spool/squid


The alert told you what to do.  Somehow this directory got mislabeled.


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