Skip to content

Automatically scan newly uploaded or modified files with ClamAV, quarantining any detected threats in a user-specific directory—ideal for shared hosting environments.

Notifications You must be signed in to change notification settings

stefanpejcic/clamav-uploads-scanner

Repository files navigation

ClamAV Upload Scanner 🔍📁

Automatically scan newly uploaded or modified files with ClamAV, quarantining any detected threats in a user-specific directory—ideal for shared hosting environments.

You can configure which file extensions to scan and specify folders to monitor for changes.


Install

This script was initially developed for use with OpenPanel, but it can be used with any control panel as long as you provide a list of paths to monitor (Docker and inotify will be installed).

  1. clone this repo:
    git clone https://github.com/stefanpejcic/clamav-uploads-scanner /usr/local/clamav-uploads-scanner/
  2. install the service by running:
    bash /usr/local/clamav-uploads-scanner/install.sh

The installation script will check if OpenPanel is in use. If it is, no additional configuration is necessary, as the document root for the domains will be automatically collected. However, if OpenPanel is not being used, you will need to specify the paths to monitor in the domains.list file and set the extensions to scan in the extensions.txt file.

Update

cd /usr/local/clamav-uploads-scanner/ && git pull

Uninstall

bash /usr/local/clamav-uploads-scanner/uninstall.sh

About

Automatically scan newly uploaded or modified files with ClamAV, quarantining any detected threats in a user-specific directory—ideal for shared hosting environments.

Topics

Resources

Stars

Watchers

Forks

Languages