Hello,
I want to integrate ClamAV with Pure-FTPD to scan the file after it was uploaded but I can't make it to works.
I tried the following:
Have someone a clue what it's wrong?
Thanks.
I want to integrate ClamAV with Pure-FTPD to scan the file after it was uploaded but I can't make it to works.
I tried the following:
Code:
After the successful installation edit the file /etc/pure-ftpd.conf and change this line to this :
CallUploadScript yes
Next create file /etc/pure-ftpd/clamav_check.sh with this content:
#!/bin/bash
#Maximum file size to scan in bytes that’s set to 10MB
MAXSIZE=10485760
if [ “$UPLOAD_SIZE” -le “$MAXSIZE” ]; then
/usr/local/cpanel/3rdparty/bin/clamdscan –remove –quiet –no-summary “$1”
fi
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
Thanks.
Last edited by a moderator: