Solved

ClamAV

Posted on 2013-06-07
5
1,504 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
5 Comments
 
LVL 26

Accepted Solution

by:
skullnobrains earned 250 total points
Comment Utility
- 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
Comment Utility
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
Comment Utility
or just check the configuration file, there must be socket/port related mistake in configuration.

Cheers
SA
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

UPDATE - 6/15/2011 Added support for Release Update 6 Maintenance Patch 2 Point Patch 1 (RU6 MP2 PP1). Fixed a defect in the username field that was hard-coded to look for a specific domain (left over code from testing). This release will be the …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now