Clamav upgrade, error scanning files

Steps to reproduce

  1. Upgrade via command line available packages for the linux server.
    $ sudo apt-get upgrade
    clamav was offered and I installed the upgrade
  2. check version
    $ clamscan --version
    ClamAV 0.103.2/26151/Sun Apr 25 13:05:06 2021
  3. Clamav not working properly.

Expected behaviour

Upgrade Clamav connecting via ssh to the webserver, and everything should work properly after that.

Actual behaviour

ClamAV not running. When I check the status, seems ok:
sudo systemctl status clamav-daemon.service

But in the admin owncloud I get error:
Failed to scan the files. Might be a misconfiguration.

The configuration is set to Daemon(socket) and it used to work properly before.
It is not possible to upload files in owncloud because the antivirus is not working properly.

Server configuration

Operating system:
Ubuntu 18.04.5 LTS
Web server:
Apache/2.4.29 (Ubuntu)
Server version: 10.5.9-MariaDB-1:10.5.9+maria~bionic binary distribution
PHP version:
PHP 7.4.16 (cli) (built: Mar 5 2021 07:54:20) ( NTS )
Copyright © The PHP Group
Zend Engine v3.4.0, Copyright © Zend Technologies
with Zend OPcache v7.4.16, Copyright ©, by Zend Technologies
ownCloud version: (see ownCloud admin page)

ownCloud log (data/owncloud.log)

{"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":2,"time":"2021-04-26T13:36:06+02:00","remoteAddr":"xxxxx","user":"xxxxxx","app":"files_antivirus","method":"POST","url":"\/index.php\/apps\/files_antivirus\/settings\/save","message":"Could not connect to socket \"\/var\/run\/clamav\/clamd.ctl\": Connection refused (code 111)"}

Check the clamav configuration. It might have changed during the upgrade. In particular, the option to listen to that “/var/run/clamav/clamd.ctl” unix socket might have been disabled, or might be listening in a different place.


Yes, it was a problem with the configuration. I managed to fix it running:

dpkg-reconfigure clamav-daemon

And choosing the proper choices.



This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.