Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Install Virus Scanner (Optional)

Alex Eng edited this page Dec 21, 2016 · 5 revisions

IMPORTANT: Zanata's wiki has moved to https://github.com/zanata/zanata-platform/wiki

New link: https://github.com/zanata/zanata-platform/wiki/Install-Virus-Scanner-(Optional)


To prevent virus infected document being uploaded, Zanata is capable of working with clamav. If clamav is not installed, a warning will be logged when files are uploaded. If clamav is installed but clamd is not running, Zanata may reject all uploaded files (depending on file type). To install and run clamav:

# Assuming the function install_missing() is still available
if [ -e /usr/bin/systemctl ];then
    install_missing clamav-server clamav-scanner-systemd
    sudo systemctl enable clamd@scan
    sudo systemctl start clamd@scan
else
    install_missing clamd
    sudo chkconfig clamd on
    if ! service clamd status ;then
	sudo service clamd start
    fi
fi

You should probably also ensure that freshclam is set to run at least once per day, to keep virus definitions up to date. The clamav package will probably do this for you, but you can check by looking for /etc/cron.daily/freshclam. To override the default behaviour above, you can set the system property virusScanner when running the server. DISABLED means no virus scanning will be performed; all files will be assumed safe. Any other value will be treated as the name of a virus scanner command: the command will be called with the name of a file to scan.

Clone this wiki locally