This tutorial we integrate ClamAV into Pure-FTPd for virus scanning in Directadmin server with Custombuild. Whenever a file gets uploaded through Pure-FTPd, ClamAV will check the file and delete it if it is malware.
Installing Pure-FTPd & ClamAV
First we need change custom build options.conf setting
root@directadmin:/usr/local/directadmin/custombuild# ./build set_service clamav ON
root@directadmin:/usr/local/directadmin/custombuild# ./build set_service pureftpd_uploadscan ON
Check options.conf
#ClamAV-related Settings clamav=yes pureftpd_uploadscan=yes
Building software
Building ClamAV
root@directadmin:/usr/local/directadmin/custombuild# ./build clamav
. . Restarting freshclam. Restarting clamd. Restarting exim. Done ClamAV.
Building Pure-FTPd
root@directadmin:/usr/local/directadmin/custombuild# ./build pureftpd
. . Enabling PureFTPd upload scanning script... Enabling pure-ftpd in systemd... Done pure-ftpd. Restarting Pure-FTPd.
Verifying PureFTPd upload scanning script running
Check that there running:
/run/pure-uploadscript.pid
Final Words
Use Malware Expert – Signatures to get a better detection rate of malware from files for FREE!