Solved

ClamAV

Posted on 2013-06-07
5
1,576 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
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Ransomware continues to be a growing problem for both personal and business users alike and Antivirus companies are still struggling to find a reliable way to protect you from this dangerous threat.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 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