How to set number of directories to be protected by Clam AntiVirus?

ClamAV is an open source (GPL) anti-virus toolkit for UNIX with an advanced tool for automatic database updates. The core of the package is an anti-virus engine available in a form of shared library. It supports on-access scanning which currently only avaliable for Linux. Thanks to Tomasz Kojm.

How to customize maximum number of directories to be protected in Omarine?

The default configuration utilizes inotify to recursively keep track of directories with maximum 8192 directories. Omarine has expanded to 65536 directories. If you need to customize number of directories to be protected it will be necessary to change inotify’s max_user_watches value.

This can be done temporarily with:

sudo sysctl fs.inotify.max_user_watches=<n>

Where <n> is the new maximum desired.

To make this permanent, run the following command for example n = 131072:

sudo sed '/max_user_watches/s,[0-9]\+$,131072,' \
     -i /etc/sysctl.conf

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.