clamav configuration problems
Posted: 3. Jan 2015, 02:04
I've several problems with clamav:
1) The package i installed from sourcery claimed to be 0.98.5 but when i ran clamav it laments to be outdated, specifically to be version 0.98.4 instead of 0.98.5. I could correct this installing the package from slackbuild.org.
2) There is a rc.clamav file in /etc/rc.d which starts clamd (the clamav daemon) and the freshclam daemon (which provides, controlled by a cronjob or by its own conf file, the newest signature files and databases). There is, like suggested a user clamav uid=210 and a group clamav gid=210. I made myself belong to the group clamav (otherwise Claws-Mail laments).
On boot i'm prompted with the following errors.
When clamd is started:
Now that has the ugly consequence that the bootup hangs here, no X gets started. When i hit Ctrl+z i can break and i'll reach the login window.
Curiously, when i start from within X in a terminal 'service start clamav' that works. There are also some minor problems with the logfiles. But to get solved the above problem is the first, and most important step.
The rc.clamav file in /etc/rc.d/ looks like this. May be someone more knowledged here can see, if there is some error/problem in it:
Another question: Should the rc.clamav file be executable or not? And, the owner should be root but for the group: should it be root to or clamav?
Thanks a lot in advance for your patience.
1) The package i installed from sourcery claimed to be 0.98.5 but when i ran clamav it laments to be outdated, specifically to be version 0.98.4 instead of 0.98.5. I could correct this installing the package from slackbuild.org.
2) There is a rc.clamav file in /etc/rc.d which starts clamd (the clamav daemon) and the freshclam daemon (which provides, controlled by a cronjob or by its own conf file, the newest signature files and databases). There is, like suggested a user clamav uid=210 and a group clamav gid=210. I made myself belong to the group clamav (otherwise Claws-Mail laments).
On boot i'm prompted with the following errors.
When clamd is started:
Code: Select all
Timeout reached while waiting for return value
Could not receive return value from daemon process
Curiously, when i start from within X in a terminal 'service start clamav' that works. There are also some minor problems with the logfiles. But to get solved the above problem is the first, and most important step.
The rc.clamav file in /etc/rc.d/ looks like this. May be someone more knowledged here can see, if there is some error/problem in it:
Code: Select all
#!/bin/sh
# Start/stop/restart clamav.
# $Id: rc.clamav,v 1.1 2007/02/14 10:29:03 root Exp root $
# Author: Eric Hameleers <alien@slackware.com>
# ---------------------------------------------------------------------------
# Slightly modified by Robby Workman <rworkman@slackbuilds.org>
# to replace backticks ( s/`command`/$(command)/ )
# Set to '1' if you want milter support:
MILTER=0
# Start clamav:
clamav_start() {
if [ -x /usr/sbin/clamd ]; then
echo -n "Starting clamd daemon: /usr/sbin/clamd "
mkdir -p /var/run/clamav/
chown clamav:clamav /var/run/clamav/
chmod 771 /var/run/clamav/
/usr/sbin/clamd
echo "."
# Give clamd a chance to create the socket
sleep 1
echo -n "Starting freshclam daemon: /usr/bin/freshclam -d -l /var/log/clamav/freshclam.log "
/usr/bin/freshclam -d -l /var/log/clamav/freshclam.log
echo "."
if [ "$MILTER" == "1" ]; then
echo -n "Starting clamav-milter daemon: /usr/sbin/clamav-milter -dblo --max-children=2 local:/var/run/clamav/clmilter.sock "
/usr/sbin/clamav-milter -dblo --max-children=2 local:/var/run/clamav/clmilter.sock
echo "."
fi
fi
}
# Stop clamav:
clamav_stop() {
kill $(cat /var/run/clamav/clamd.pid)
#killall freshclam
kill $(cat /var/run/clamav/freshclam.pid)
[ "$MILTER" == "1" ] && killall clamav-milter
}
# Restart clamav:
clamav_restart() {
clamav_stop
sleep 1
clamav_start
}
case "$1" in
'start')
clamav_start
;;
'stop')
clamav_stop
;;
'restart')
clamav_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
Thanks a lot in advance for your patience.