How To Integrate ClamAV Into PureFTPd For Virus Scanning On Ubuntu 12.04
How To Integrate ClamAV Into PureFTPd For Virus Scanning On Ubuntu 12.04Version 1.0 This tutorial explains how you can integrate ClamAV into PureFTPd for virus scanning on an Ubuntu 12.04 system. In the end, whenever a file gets uploaded through PureFTPd, ClamAV will check the file and delete it if it is malware. I do not issue any guarantee that this will work for you!
1 Preliminary NoteYou should have a working PureFTPd setup on your Ubuntu 12.04 server, e.g. as shown in this tutorial: Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Ubuntu 12.04. Make sure that you are logged in as root (type in sudo su to become root), because we must run all the steps from this tutorial as root user.
2 Installing ClamAVClamAV can be installed as follows: apt-get install clamav clamav-daemon clamav-data Run freshclam to download the latest virus signatures, and the start the ClamAV daemon: /etc/init.d/clamav-daemon start
3 Configuring PureFTPdFirst we create the file /etc/pure-ftpd/conf/CallUploadScript which simply contains the string yes: echo "yes" > /etc/pure-ftpd/conf/CallUploadScript Next we create the file /etc/pure-ftpd/clamav_check.sh (which will call /usr/bin/clamdscan whenever a file is uploaded through PureFTPd)... vi /etc/pure-ftpd/clamav_check.sh
... and make it executable: chmod 755 /etc/pure-ftpd/clamav_check.sh Now we edit /etc/default/pure-ftpd-common... vi /etc/default/pure-ftpd-common ... and change the UPLOADSCRIPT line as follows:
Finally we restart PureFTPd: /etc/init.d/pure-ftpd-mysql restart That's it! Now whenever someone tries to upload malware to your server through PureFTPd, the "bad" file(s) will be silently deleted.
4 Links
|




Recent comments
11 hours 6 min ago
20 hours 33 min ago
21 hours 23 min ago
1 day 56 min ago
1 day 5 hours ago
1 day 5 hours ago
1 day 7 hours ago
1 day 17 hours ago
1 day 22 hours ago
2 days 19 min ago