Change its permissions and make it executable:
chmod 755 /etc/pure-ftpd/clamav_check.sh
Now we should start the pure-uploadscript daemon every time to call our script when a file is uploaded
/usr/sbin/pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh
And to let it start with your server/vps reboots just run this :
echo “/usr/sbin/pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh” >> /etc/rc.d/rc.local
Now restart pure-ftpd:
service pure-ftpd restart
Now all your uploaded files which are less than 10MB in size will be scanned, adjust this size limit per your needs.


