This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 216260 - SELinux policy prevents clamd from starting
SELinux policy prevents clamd from starting
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
6
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-17 23:46 EST by Gerald Leung
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-20 14:07:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Gerald Leung 2006-11-17 23:46:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061027 Firefox/2.0

Description of problem:
Clamd fails to start. Below is the information from /var/log/messages and /var/log/audit/audit.log.

Information from /var/log/messages:
Nov 17 23:08:38 doghouse clamd[22881]: clamd daemon 0.88.6 (OS: linux-gnu, ARCH:
 i386, CPU: i386) 
Nov 17 23:08:38 doghouse clamd[22881]: Log file size limit disabled. 
Nov 17 23:08:38 doghouse clamd[22881]: Running as user clamav (UID 514, GID 514)
 
Nov 17 23:08:38 doghouse clamd[22881]: Reading databases from /var/clamav 
Nov 17 23:08:38 doghouse clamd[22881]: Unable to open file or directory 


information from /var/log/audit/audit.log:
type=AVC msg=audit(1163822928.122:347): avc:  denied  { search } for  pid=22897 
comm="clamd" name="sys" dev=proc ino=-268435429 scontext=user_u:system_r:clamd_t
:s0 tcontext=system_u:object_r:sysctl_t:s0 tclass=dir
type=SYSCALL msg=audit(1163822928.122:347): arch=40000003 syscall=5 success=no e
xit=-13 a0=4fc7b35f a1=0 a2=4fc93ff4 a3=8d1c420 items=0 ppid=22896 pid=22897 aui
d=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) comm="c
lamd" exe="/usr/sbin/clamd" subj=user_u:system_r:clamd_t:s0 key=(null)
type=AVC msg=audit(1163822928.125:348): avc:  denied  { read } for  pid=22897 co
mm="clamd" name="clamav" dev=hda8 ino=256259 scontext=user_u:system_r:clamd_t:s0
 tcontext=system_u:object_r:var_t:s0 tclass=dir
type=SYSCALL msg=audit(1163822928.125:348): arch=40000003 syscall=5 success=no e
xit=-13 a0=8d1c2e8 a1=18800 a2=0 a3=8d1c420 items=0 ppid=22896 pid=22897 auid=50
0 uid=514 gid=514 euid=514 suid=514 fsuid=514 egid=514 sgid=514 fsgid=514 tty=(n
one) comm="clamd" exe="/usr/sbin/clamd" subj=user_u:system_r:clamd_t:s0 key=(nul
l)


Version-Release number of selected component (if applicable):
selinux-policy-2.4.3-2

How reproducible:
Always


Steps to Reproduce:
1. # /etc/init.d/clamd start

Actual Results:
Clamd fails to start and terminal displays the following message:
Starting Clam AntiVirus Daemon:                            [FAILED]


Expected Results:
Clamd starts and terminal displays the following message:
Starting Clam AntiVirus Daemon:                            [  OK  ]


Additional info:
clamav-0.88.6-1
Comment 1 Daniel Walsh 2006-11-20 14:07:39 EST
This looks like a packageing problem.  SELinux expects /var/lib/clamav instead
of /var/clamav.  THis is the path in the fedora-extras package.

If you need to use /var/clamav, you can change the file context to 
clamd_var_lib_t

And then use semanage fcontext -a -t clamd_var_lib_t /var/clamav

Or if you move the directory to /var/lib you need to restorecon -R -v
/var/lib/clamav  (Which I recommend)


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