Monday, February 1, 2016

ClamAV starting issue ( CentOS 7 )

Recently, I was installing and configuring squid proxy server and dansguardian for content filtering. Dansguardian has dependencies of clamav packages.

After installing and configuring the services, when I rebooted the machine, I encountered an error for clamd.dansguardian.service.

Error :

 [root@server ~]# systemctl status clamd.dansguardian.service
clamd.dansguardian.service - Clamd Dansguardian An Interface Between MTA And Content Checkers
   Loaded: loaded (/usr/lib/systemd/system/clamd.dansguardian.service; enabled)
   Active: failed (Result: exit-code) since Tue 2016-02-02 00:34:16 EST; 34s ago
  Process: 1298 ExecStart=/usr/sbin/clamd -c /etc/clamd.d/dansguardian.conf (code=exited, status=1/FAILURE)

Feb 02 00:34:00 server.linuxroot.info systemd[1]: Starting Clamd Dansguardian An Interface Between MTA And Content Checkers...
Feb 02 00:34:02 server.linuxroot.info clamd[1298]: clamd daemon 0.98.7 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Feb 02 00:34:02 server.linuxroot.info clamd[1298]: Running as user root (UID 0, GID 0)
Feb 02 00:34:02 server.linuxroot.info clamd[1298]: Log file size limited to 1048576 bytes.
Feb 02 00:34:02 server.linuxroot.info clamd[1298]: Reading databases from /var/lib/clamav
Feb 02 00:34:02 server.linuxroot.info clamd[1298]: Not loading PUA signatures.
Feb 02 00:34:02 server.linuxroot.info clamd[1298]: Bytecode: Security mode set to "TrustSigned".
Feb 02 00:34:06 server.linuxroot.info clamd[1298]: LibClamAV Warning: **************************************************
Feb 02 00:34:06 server.linuxroot.info clamd[1298]: LibClamAV Warning: ***  The virus database is older than 7 days!  ***
Feb 02 00:34:06 server.linuxroot.info clamd[1298]: LibClamAV Warning: ***   Please update it as soon as possible.    ***
Feb 02 00:34:06 server.linuxroot.info clamd[1298]: LibClamAV Warning: **************************************************
Feb 02 00:34:16 server.linuxroot.info clamd[1298]: Loaded 3798335 signatures.
Feb 02 00:34:16 server.linuxroot.info clamd[1298]: ERROR: LOCAL: Socket file /var/run/dansguardian/clamd.sock could not be bou...ectory
Feb 02 00:34:16 server.linuxroot.info clamd[1298]: LOCAL: Socket file /var/run/dansguardian/clamd.sock could not be bound: No ...ectory
Feb 02 00:34:16 server.linuxroot.info systemd[1]: clamd.dansguardian.service: control process exited, code=exited status=1
Feb 02 00:34:16 server.linuxroot.info systemd[1]: Failed to start Clamd Dansguardian An Interface Between MTA And Content Checkers.
Feb 02 00:34:16 server.linuxroot.info systemd[1]: Unit clamd.dansguardian.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.



Solution :

NOTE : Before making any changes, kindly take a backup copy of all the files that are going to be modified.

I made changes in below files. 

[root@server ~]# vim /etc/clamd.d/dansguardian.conf

PidFile /var/run/clamd.pid
User root
LocalSocket /var/run/clamd.sock


[root@server ~]# vim /etc/sysconfig/clamd.dansguardian

CLAMD_SOCKET=/var/run/clamd.sock

[root@server ~]# vim /usr/lib/systemd/system/clamd.dansguardian.service

PIDFile=/var/run/clamd.pid









































No comments:

Post a Comment