Friday, February 7, 2020

Ubuntu 18.04 Installing ClamAV with clamonacc

A quick guide to installing ClamAV with clamonacc on Ubuntu 18.04.

Note: This was installed on a virtualmin server with clamav. Existing clamav was removed/purged via apt-get and reinstalled. clamd.conf reflects settings as part of virtualmin and clamonacc.

Install clamav and mailx

sudo apt-get install -y bsd-mailx clamav clamav-base clamav-daemon clamav-docs clamav-freshclam

Create Quarantine Folder

mkdir /root/quarantine

Create the following files (see gist files below at end of blog or here)
  • /etc/systemd/system/clamonacc.service
  • /etc/clamav/clamd.conf
  • /etc/clamav/
Modify them as needed (paths, email addresses, settings, etc)

Enable services

systemctl enable clamav-daemon.service
systemctl enable clamonacc.service
systemctl enable clamav-freshclam.service

Add root to clamav group

Clam, by default, will run under the clamav user and group. You can choose to keep/configure this or run as root. If you scan /root or folders owned by root you can encounter lstat() errors while running under the clamav user.

usermod -a -G clamav root


00 01,13 * * *  /usr/bin/freshclam --quiet
0 19 * * 1-5 nice -n 16  systemd-cat --identifier="clamav-scan" clamdscan --quiet --fdpass /home /tmp  >/dev/null 2>&1
0 6 * * 6 nice -n 18  systemd-cat --identifier="clamav-scan" clamdscan --quiet --fdpass /  >/dev/null 2>&1

Final Step
  • Reboot
Gist Files


  1. Please explain how to do the Cron part

  2. The share of activities within the regulated market has been increasing 카지노 yr over yr. In 2019, seventy seven.3% of all gambling happened at authorized on line casino websites. Whatever you determine to do subsequent, just keep in mind that|do not neglect that} cell gambling is meant to be fun, which is why it’s so necessary to all the time gamble responsibly everytime you play on line casino video games.