Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

ClamAV and Pure-FTPD

Discussion in 'Security' started by XeonS, May 22, 2016.

  1. XeonS

    XeonS Registered

    Joined:
    May 22, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    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:

    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
    Have someone a clue what it's wrong?

    Thanks.
     
    #1 XeonS, May 22, 2016
    Last edited by a moderator: May 22, 2016
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you elaborate on what in-particular is not working? How are you testing this modification? Also, ensure you follow the instructions on the following document to ensure changes to the FTP configuration file are preserved:

    FTP FAQ - Documentation - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice