Solved

ClamAV

Posted on 2013-06-07
5
1,770 Views
Last Modified: 2013-11-22
Hello,

am not to start the ClamAV service from my Centos Mail server. am getting below error.
can any body help me on this

root@galaxy [/home/plokam]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: ERROR: LOCAL: Socket file /var/clamd could not b                                                                                        e bound: Permission denied
ERROR: Can't unlink the socket file /var/clamd
                                                           [FAILED]
0
Comment
Question by:mummuluri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 27

Accepted Solution

by:
skullnobrains earned 250 total points
ID: 39231058
- make sure you start the service as root
- if yes, make sure the clamav user can write to /var but as far as i remember, clamav creates the socket before it drops privileges so this should not be nessessary

if you are performing a new install, you may also move the socket elsewhere : /tmp, /var/run or a dedicated subdirectory in /var
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 250 total points
ID: 39231469
Hi,

as you see you get the error message:

root@galaxy [/home/plokam]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: ERROR: LOCAL: Socket file /var/clamd could not b                                                                                        e bound: Permission denied
ERROR: Can't unlink the socket file /var/clamd
                                                           [FAILED]

This is because you can not directly write under /var.
- Please create a directory called  /var/clamav
- Change owner to the of the directory to clamav user (either clam or clamav check your clamav config file). I am assuming it to be the user clam:
  chown clam:clam /var/clamav

Open in new window

- Edit your /etc/init.d/clamd file and make sure that it creates the socket under /var/clamav instead of /var. To accomplish this edit your /etc/clamd.conf and find these lines:

# Path to a local socket file the daemon will listen on.
# Default: disabled (must be specified by a user)
# LocalSocket /var/run/clamav/clamd.sock

Open in new window


and modify it to read:

# Path to a local socket file the daemon will listen on.
# Default: disabled (must be specified by a user)
LocalSocket /var/run/clamav/clamd.sock

Open in new window


Save & Exit. This should do the trick. It seems that you've overridden the default config options during the compile using command line switches.

Also please post the output of your sestatus command here if it still does not work.

Cheers,
K.
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39231669
or just check the configuration file, there must be socket/port related mistake in configuration.

Cheers
SA
0

Featured Post

2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question