[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ClamAV

Posted on 2013-06-07
5
Medium Priority
?
2,031 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 1000 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 1000 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

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

656 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