These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Cannot switch to 'Local Server Scanner' on the new forum.
A new install with CentOS 7.
In Virtualmin > Email Settings > Spam and Virus Scanning - when changing the 'Virus Scanning Program' to Local Server Scanner I get the following error:
The selected virus scanning command does not work :
ERROR: Could not connect to clamd on LocalSocket /var/run/clamd.scan/clamd.sock: No such file or directory
----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.000 sec (0 m 0 s)
The server has been up and running for about a week and I have had this issue from day one.
Current status of clamd = 'not running'. Starting clamd service I get:
Feb 08 08:49:00 server1 systemd[1]: Starting Generic clamav scanner daemon...
-- Subject: Unit clamd@scan.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit clamd@scan.service has begun starting up.
Feb 08 08:49:00 server1 clamd[26881]: Received 0 file descriptor(s) from systemd.
Feb 08 08:49:00 server1 clamd[26881]: clamd daemon 0.101.1 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Feb 08 08:49:00 server1 clamd[26881]: Running as user clamscan (UID 996, GID 992)
Feb 08 08:49:00 server1 clamd[26881]: Log file size limited to 1048576 bytes.
Feb 08 08:49:00 server1 clamd[26881]: Reading databases from /var/lib/clamav
Feb 08 08:49:00 server1 clamd[26881]: Not loading PUA signatures.
Feb 08 08:49:00 server1 clamd[26881]: Bytecode: Security mode set to "TrustSigned".
Feb 08 08:49:14 server1 clamd[26881]: Loaded 6800143 signatures.
Feb 08 08:49:15 server1 clamd[26881]: LOCAL: Could not create socket directory: /var/run/clamd.scan: Permission denied
Feb 08 08:49:15 server1 clamd[26881]: ERROR: LOCAL: Could not create socket directory: /var/run/clamd.scan: Permission denied
Feb 08 08:49:15 server1 clamd[26881]: ERROR: LOCAL: Socket file /var/run/clamd.scan/clamd.sock could not be bound: No such file or directory
Feb 08 08:49:15 server1 clamd[26881]: LOCAL: Socket file /var/run/clamd.scan/clamd.sock could not be bound: No such file or directory
Feb 08 08:49:15 server1 systemd[1]: clamd@scan.service: control process exited, code=exited status=1
Feb 08 08:49:15 server1 systemd[1]: Failed to start Generic clamav scanner daemon.
-- Subject: Unit clamd@scan.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit clamd@scan.service has failed.
--
-- The result is failed.
Feb 08 08:49:15 server1 systemd[1]: Unit clamd@scan.service entered failed state.
Feb 08 08:49:15 server1 systemd[1]: clamd@scan.service failed.
This is with 'Standalone Scanner' set as the Virus Scanning Program in Virtualmin
Having tried a few combinations of start/stops/enable/disable/boot/reboot, what it boils down to is
if ClamAV Server is running and the system then rebooted then Clam shows the errors in the first post and CPU usage is consistently high. So I then have to manually disable and then enable ClamAV Server - system then works correctly.
I just have to Disable/Enable each time I reboot.