This is an example of anti-virus implementation with an Ubuntu server.
Our back office management solution allows users to upload files in various sections of the application for storage or file sharing. For this reason, checking of files for virus is an important advantage.
We use the ClamAV module integration from Drupal 8.
1) Install ClamAV on Ubuntu
Installation on Ubuntu server is straight forward. However, it is better to install with clamav-daemon clamav-freshclam options for later settings
You can test with clamscan -r /home for instance
For further options you may refer to ClamAV website.
2) Install and set-up Drupal module
Module installation on Drupal 8 has no specific requirements.
As indicated on the module page, "Daemon mode" is preferred when executing the scan.
In the settings page (/admin/config/media/clamav), select Daemon mode (over Unix socket) in scan mechanism
You need to indicate the path for the socket pointing file; it can be found in the configuration file : /etc/clamav/clamd.conf.
Input the file path into next setting:
When uploading a file on the server via any upload interface, the file is scanned and validated. Scanning process is logged:
The Eicar test virus file is filtered when uploaded:
If you have implemented ClamAV with Drupal and have further comments, please feel free input your own.