In this note I want to tell you how to configure the
ClamAV antivirus to scan files that are uploaded to the server via
The example is for
Linux Ubuntu. For
CentOS there won’t be much difference.
clamav, update it and run:
apt-get install clamav clamav-daemon clamav-data
service clamav-daemon start
Next you need to allow scripts to be executed when uploading files in the
echo yes > /etc/pure-ftpd/conf/CallUploadScript
Now we create the script itself:
Here is the content:
/usr/bin/clamdscan --remove --quiet --no-summary "$1"
Making it executable:
chmod +x /etc/pure-ftpd/clam-checker
Now open the file
/etc/default/pure-ftpd-common in your favorite editor.
UPLOADSCRIPT section in it and add the following line to it:
PureFTPD and enjoy life: