by default under Ubuntu (REGULAR AND LTS) you have a default cron job which 
starts clamav on bootup itself (see /etc/cron.daily, /etc/cron.weekly, so on) 
and then you do also manually the same, so you get 2 sock-files.
Check if  under /etc/init.d/ the wrapper shell clamav-daemon has the permission 
0600 (no executuion permission).
Rename in the default cron dirs (named in my first sentence) files like 
clamav-daemon.
After that you must start clamd always byself in terminal or via a own cronjob 
on bootup e.g.

DO NOT INSTALL THE CLASSICAL CLAM-AV UNDER UBUNTU, WE HAVE A SPECIAL 
"UBUNTURIZED" VERSION IN THE REPOSITORY! THE CLASSICAL deb. DO NOT WORK WELL ON 
UBUNTU!
On Ubuntu 20.04 the current clamav is regular 0.103 ON LTS (READ: 
https://docs.clamav.net/faq/faq-eol.html), please upgrade to a new Ubuntu 
Version and then you will get a newer clamav version (1.4.3 or higher) then all 
should working again, if you install clamav out of our repository.

Von / From:     Alex Via Clamav-Users <mailto:[email protected]>
An / To:        Newcomer01 <mailto:[email protected]>
CC / CC:        1984-Server1 Accompany303 
<mailto:[email protected]>
Gesendet / Sent:        Sonntag, Dezember 07, 2025 um 22:24 (at 10:24 PM) +0100
Betreff / Subject:      [clamav-users] "socket in use" error after installing 
official clamav package

Problem:
When clamav-daemon.service runs, it always encounters the error "LOCAL: Socket file 
/run/clamav/clamd.ctl is in use by another process." Then it immediately restarts, 
and fails again after the signatures have been loaded.

Background:
I needed to upgrade clamav to 1.4.3 using the official deb package from 
https://www.clamav.net/downloads
I made sure I uninstalled the old clamav v0.103 from my distro (Ubuntu 20.04).
I installed the clamav 1.4.3 .deb package and migrated clamd.conf and 
freshclam.conf
I've done some other stuff that I can't quite recall, like fixing the path to 
the databases that the services point to.

I have found two sockets, and I thin one is from my distro's old installation.
/var/run/clamav/clamd.ctl
/run/clamav/clamd.ctl

Since then I have updated clamd.conf to use LocalSocket /run/clamav/clamd.ctl 
instead of the one under /var
But strangely, every time I start clamav-daemon.socket it creates both socket 
files. They both have the same inode.

Is there any way I can resolve this socket conflict?
Where is the 2nd socket file coming from?

_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat
_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat

Reply via email to