<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fh="http://purl.org/syndication/history/1.0"><channel><title>ClamUI · Docs | Blog</title><description>Install, use, configure, and contribute to ClamUI.</description><link>https://clamui.com/</link><language>en</language><fh:complete/><atom:link rel="self" href="https://clamui.com/blog/rss.xml"/><item><title>Do you need antivirus on Linux? An honest answer</title><link>https://clamui.com/blog/do-you-need-antivirus-on-linux/</link><guid isPermaLink="true">https://clamui.com/blog/do-you-need-antivirus-on-linux/</guid><description>Most Linux desktops do fine without a resident antivirus. Some do not. This post sorts out which situations call for a scanner, what a scanner like ClamAV can catch, and what it never will.</description><pubDate>Fri, 04 Dec 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Ask this question in any Linux forum and you get two answers: “Linux doesn’t get viruses” and “Of course you need one”. Both are too simple. Whether a virus scanner helps depends on what you do with the machine, and on what you expect the scanner to do.&lt;/p&gt;
&lt;p&gt;We build ClamUI, a desktop app for ClamAV, so we have a stake in this. We still think the honest answer for many desktops is “not really”. Here is how to tell which group you are in.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;why-linux-desktops-get-by-with-less&quot;&gt;Why Linux desktops get by with less&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;A typical Linux desktop has a few things going for it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Software comes from signed repositories.&lt;/strong&gt; Most programs are installed through the distribution’s package manager, which checks signatures from a source you already trust. You rarely download and run random installers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You don’t work as root.&lt;/strong&gt; A program you start runs with your user rights. It can still damage your own files, but changing the system needs &lt;code dir=&quot;auto&quot;&gt;sudo&lt;/code&gt; and your password.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sandboxed apps.&lt;/strong&gt; Flatpak apps run in a sandbox with only the permissions they declare. That limits what a bad app can reach.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fewer targets.&lt;/strong&gt; Most desktop malware is written for Windows. That is not protection, but it does change the odds.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of this makes Linux immune. It means the usual way malware arrives on Windows, a downloaded installer run with admin rights, is less common.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;where-a-scanner-makes-sense&quot;&gt;Where a scanner makes sense&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;A scanner earns its place when files reach your machine from outside the trusted channels, or pass through it to other people:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Files you pass on to Windows or macOS users.&lt;/strong&gt; A Windows virus does nothing on your Linux machine, but it will run on your colleague’s laptop when you forward the attachment or share the folder. Scanning protects them, not you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File servers and shared folders.&lt;/strong&gt; If your machine serves files over Samba or NFS, or syncs a shared Nextcloud folder, you are a distribution point for whatever lands there.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mail servers.&lt;/strong&gt; This is what ClamAV was built for. Its own documentation describes it as “designed especially for e-mail scanning on mail gateways”.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Downloads outside the package manager.&lt;/strong&gt; AppImages, binaries from project pages, game mods, archives from forums, scripts you are about to run. Scanning them before you open them is cheap.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;USB drives and external disks.&lt;/strong&gt; Especially ones that also go into other computers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rules you have to follow.&lt;/strong&gt; Some company policies and compliance frameworks require malware scanning on every system, Linux included. A scanner with logs and scheduled scans gives you something to show.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If none of these fit, an occasional scan of your downloads folder is a reasonable middle ground.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;what-a-scanner-cannot-do&quot;&gt;What a scanner cannot do&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;This part matters more than the yes or no. ClamAV is a signature-based scanner. It compares files against a database of known malware. The project is clear that it “is not a traditional anti-virus or endpoint security suite”.&lt;/p&gt;
&lt;p&gt;In practice that means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;It does not stop phishing.&lt;/strong&gt; A fake login page steals your password without a single malicious file. The best defence there is a password manager that only fills in on the real domain, and two-factor authentication.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It does not catch everything new.&lt;/strong&gt; A signature has to exist before a file can match it. Freshly made or targeted malware often has none yet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It does not watch what programs do.&lt;/strong&gt; ClamAV checks files. It does not monitor running processes for suspicious behaviour.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It does not replace updates.&lt;/strong&gt; Most real attacks on Linux use known security holes in software that was not updated. Installing updates protects you far more than any scanner.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It does not scan in real time by default.&lt;/strong&gt; On-access scanning exists, but you have to set it up. Without it, ClamAV only checks what you ask it to.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A scanner is one layer. Updates, a firewall, careful sudo use, sandboxed apps and backups are the others, and most of them matter more.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;a-short-checklist&quot;&gt;A short checklist&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Before you install anything, check the basics:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Updates install automatically, or you install them regularly.&lt;/li&gt;
&lt;li&gt;A firewall is active, especially on laptops in public networks.&lt;/li&gt;
&lt;li&gt;You have backups that a compromised account cannot delete.&lt;/li&gt;
&lt;li&gt;You use a password manager and two-factor authentication.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then decide on scanning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You share files with Windows users, run a server, or must follow a policy:&lt;/strong&gt; set up regular scans, and consider on-access scanning for download and shared folders.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You download a lot outside the package manager:&lt;/strong&gt; scan those files before opening them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neither:&lt;/strong&gt; you are fine without a scanner. An occasional manual scan does no harm.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h2 id=&quot;where-clamui-fits&quot;&gt;Where ClamUI fits&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;ClamUI is a desktop front end for ClamAV. It does not add its own detection engine. It makes the parts above easier to use: scanning files and folders, keeping the database current, scheduling scans, setting up on-access scanning, and handling quarantine. Its security audit also checks the other layers from the checklist, such as automatic updates and the firewall.&lt;/p&gt;
&lt;p&gt;If you decided you need a scanner, &lt;a href=&quot;https://clamui.com/docs/getting-started/&quot;&gt;getting started&lt;/a&gt; walks you through your first scan. If you want to know how ClamAV is put together first, read &lt;a href=&quot;https://clamui.com/blog/how-clamav-works-on-your-desktop/&quot;&gt;how ClamAV actually works on your desktop&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.clamav.net/Introduction.html&quot;&gt;ClamAV documentation: Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.clamav.net/manual/OnAccess.html&quot;&gt;ClamAV documentation: On-Access Scanning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.flatpak.org/en/latest/sandbox-permissions.html&quot;&gt;Flatpak documentation: Sandbox permissions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>clamav</category><category>linux</category><category>security</category></item><item><title>Help translate ClamUI</title><link>https://clamui.com/blog/help-translate-clamui/</link><guid isPermaLink="true">https://clamui.com/blog/help-translate-clamui/</guid><description>ClamUI&apos;s translations moved to Hosted Weblate. If you speak another language, you can now help in the browser, a few strings at a time, without setting up anything locally.</description><pubDate>Fri, 04 Dec 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;ClamUI ships in ten languages today: English, German, Spanish, French, Hungarian, Italian, Norwegian Bokmål, Brazilian Portuguese, Vietnamese and Simplified Chinese. Until now, improving one of them meant cloning the repository, installing gettext and editing &lt;code dir=&quot;auto&quot;&gt;.po&lt;/code&gt; files by hand. That kept a lot of people out who would have been happy to fix a clumsy sentence.&lt;/p&gt;
&lt;p&gt;So translations now run on &lt;a href=&quot;https://hosted.weblate.org/engage/clamui/&quot;&gt;Hosted Weblate&lt;/a&gt;, which hosts open source projects free of charge.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;/h2&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&quot;https://hosted.weblate.org/engage/clamui/&quot;&gt;ClamUI on Weblate&lt;/a&gt; and sign in. You can create an account or use an existing one, such as GitHub.&lt;/li&gt;
&lt;li&gt;Pick your language. Weblate shows which strings are missing or need a review.&lt;/li&gt;
&lt;li&gt;Translate in the browser. Each string shows its source text, where it is used, and any note we left for translators.&lt;/li&gt;
&lt;li&gt;Weblate checks your work: placeholders like &lt;code dir=&quot;auto&quot;&gt;{count}&lt;/code&gt;, plural forms, and markup must stay intact.&lt;/li&gt;
&lt;li&gt;Your changes are collected into a pull request on GitHub. After the checks pass, they ship with the next release.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You do not need to translate everything at once. Fixing ten strings in your language helps.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;a-new-language&quot;&gt;A new language&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;If your language is missing, use &lt;strong&gt;Start new translation&lt;/strong&gt; on the project page. A language becomes selectable in ClamUI once every string is translated, so a new language can grow over a few weeks until it is complete.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;a-few-rules&quot;&gt;A few rules&lt;/h2&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Keep &lt;strong&gt;ClamUI&lt;/strong&gt;, command names and settings keys as they are.&lt;/li&gt;
&lt;li&gt;Keep placeholders such as &lt;code dir=&quot;auto&quot;&gt;{count}&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;%s&lt;/code&gt;, and markup such as &lt;code dir=&quot;auto&quot;&gt;&amp;#x3C;b&gt;&lt;/code&gt;, exactly as in the source.&lt;/li&gt;
&lt;li&gt;Use the punctuation and quotation marks that are normal in your language.&lt;/li&gt;
&lt;li&gt;Use the same translation for a label everywhere it appears.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The full list is in the &lt;a href=&quot;https://clamui.com/docs/contributing/translating/&quot;&gt;translation guide&lt;/a&gt;. It also covers the manual workflow, if you prefer to work with &lt;code dir=&quot;auto&quot;&gt;.po&lt;/code&gt; files directly.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;credits&quot;&gt;Credits&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The About dialog lists contributors from the &lt;a href=&quot;https://github.com/linx-systems/clamui/blob/master/AUTHORS&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;AUTHORS&lt;/code&gt;&lt;/a&gt; file. If you want to be listed, open an issue or a pull request that adds your name.&lt;/p&gt;
&lt;p&gt;Questions about a string or a term? Ask in &lt;a href=&quot;https://github.com/linx-systems/clamui/issues&quot;&gt;GitHub Issues&lt;/a&gt; or on the &lt;a href=&quot;https://discord.gg/TT4zvgksZC&quot;&gt;Linx Systems Discord&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>translation</category><category>community</category></item><item><title>How ClamAV actually works on your desktop</title><link>https://clamui.com/blog/how-clamav-works-on-your-desktop/</link><guid isPermaLink="true">https://clamui.com/blog/how-clamav-works-on-your-desktop/</guid><description>ClamAV is not one program but a small toolkit. This post walks through its parts, its database, updates, on-access scanning and file permissions, and shows where ClamUI sits on top of it.</description><pubDate>Thu, 03 Dec 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If you install ClamAV on a Linux desktop, you do not get one program. You get a small toolkit: a scanning library, two ways to scan, a database updater and an optional on-access scanner. Each part has its own job, its own configuration and sometimes its own user account. This post goes through them one by one.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;what-clamav-is-and-what-it-is-not&quot;&gt;What ClamAV is, and what it is not&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;ClamAV is an open source (GPLv2) anti-virus toolkit published by Cisco. Its own documentation says it was “designed especially for e-mail scanning on mail gateways”, and also that it “is not a traditional anti-virus or endpoint security suite”.&lt;/p&gt;
&lt;p&gt;That shapes what you should expect from it on a desktop:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;It is signature based.&lt;/strong&gt; ClamAV compares files against a database of known malware signatures. It also has some heuristic checks, but the database does most of the work. It does not watch how running programs behave.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It does not protect you in real time by default.&lt;/strong&gt; A plain installation scans when you ask it to. Real-time scanning exists on Linux, but it is a separate component that you have to configure and run yourself.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It needs a current database.&lt;/strong&gt; With old signatures, it can miss newer threats. Keeping the database up to date is part of running ClamAV.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That makes it a good fit for checking downloads, USB drives, mail attachments or shared folders on demand, not a replacement for a full security suite.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;the-parts&quot;&gt;The parts&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;libclamav&quot;&gt;libclamav&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The scanning engine lives in a shared library, libclamav. It loads the signature database, unpacks archives and other containers, and matches content against signatures. Every scanner below uses this library. You never run it directly.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;clamscan-simple-but-slow-to-start&quot;&gt;clamscan: simple, but slow to start&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;clamscan&lt;/code&gt; is the standalone command line scanner. You point it at a file or folder and it prints what it found.&lt;/p&gt;
&lt;p&gt;The ClamAV documentation says clamscan “will create a new engine and load in the virus database each time it is run”. The database is large, so every clamscan run spends a noticeable amount of time and memory before it scans the first file. For an occasional scan this is fine. For many small scans in a row it adds up.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;clamd-and-clamdscan-load-once-scan-often&quot;&gt;clamd and clamdscan: load once, scan often&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;clamd&lt;/code&gt; is the ClamAV daemon. It is a multi-threaded background service built on libclamav. It loads the database once, keeps it in memory, and waits for scan requests on a Unix socket or a TCP socket. Its settings live in &lt;code dir=&quot;auto&quot;&gt;clamd.conf&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;clamdscan&lt;/code&gt; is a small client that sends the scan request to the running daemon and prints the result. If clamd is not running, clamdscan cannot do anything.&lt;/p&gt;
&lt;p&gt;Because the database is already loaded, a new scan request does not have to load it first. The cost is that clamd holds the database in RAM the whole time it runs. ClamAV’s own Docker documentation mentions upwards of 1.2 GiB of RAM just to load the signatures, and briefly about twice that while the daemon reloads a new database next to the old one. The exact numbers depend on the version and the database, but it matters on a machine with little memory.&lt;/p&gt;
&lt;p&gt;There is one more detail that matters later: how files get to the daemon. With a local daemon on a Unix socket, clamdscan passes paths by default, and the daemon opens the files itself. So clamd, which usually runs as its own user, needs read access to what you scan. With &lt;code dir=&quot;auto&quot;&gt;--fdpass&lt;/code&gt;, clamdscan opens the file with your permissions and hands the open file to the daemon instead. This only works over a Unix socket. With &lt;code dir=&quot;auto&quot;&gt;--stream&lt;/code&gt;, or with a daemon on another machine over TCP, clamdscan sends the file content.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;freshclam-and-the-virus-database&quot;&gt;freshclam and the virus database&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;the-database-files&quot;&gt;The database files&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;ClamAV’s official signatures come from Cisco Talos in three databases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;main&lt;/strong&gt;: the large base set of signatures. It changes rarely.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;daily&lt;/strong&gt;: the frequent additions and fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;bytecode&lt;/strong&gt;: small programs that the engine can run for detections that plain signatures cannot express.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each comes as a &lt;code dir=&quot;auto&quot;&gt;.cvd&lt;/code&gt; file (ClamAV Virus Database), a digitally signed container. After incremental updates you may see a &lt;code dir=&quot;auto&quot;&gt;.cld&lt;/code&gt; file instead, which holds the same kind of content.&lt;/p&gt;
&lt;p&gt;Where they live depends on how ClamAV was installed. A build from source uses &lt;code dir=&quot;auto&quot;&gt;/usr/local/share/clamav&lt;/code&gt; by default. Distribution packages usually choose their own path. Debian and Ubuntu, for example, use &lt;code dir=&quot;auto&quot;&gt;/var/lib/clamav&lt;/code&gt;. The &lt;code dir=&quot;auto&quot;&gt;DatabaseDirectory&lt;/code&gt; setting in &lt;code dir=&quot;auto&quot;&gt;freshclam.conf&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;clamd.conf&lt;/code&gt; tells you the path on your system. If it is not set, the build default applies.&lt;/p&gt;
&lt;p&gt;Without a readable database, neither clamscan nor clamd can scan.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;freshclam&quot;&gt;freshclam&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;freshclam&lt;/code&gt; is the updater. It downloads the official databases and, where possible, fetches small incremental updates instead of the whole file again. If a database file is damaged, it downloads a fresh copy.&lt;/p&gt;
&lt;p&gt;You can run freshclam by hand, from cron, or as a daemon with &lt;code dir=&quot;auto&quot;&gt;freshclam -d&lt;/code&gt; that checks for updates at a fixed interval. Many distributions ship it as a systemd service, often called &lt;code dir=&quot;auto&quot;&gt;clamav-freshclam&lt;/code&gt;, that does exactly that. If clamd is running, freshclam can tell it to reload the new database (the &lt;code dir=&quot;auto&quot;&gt;NotifyClamd&lt;/code&gt; option).&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;why-sudo-freshclam-can-fail&quot;&gt;Why &lt;code dir=&quot;auto&quot;&gt;sudo freshclam&lt;/code&gt; can fail&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The update service is running, you want an update right now, you type &lt;code dir=&quot;auto&quot;&gt;sudo freshclam&lt;/code&gt;, and you get this:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;ERROR: Failed to lock the log file /var/log/clamav/freshclam.log: Resource temporarily unavailable&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;ERROR: initialize: libfreshclam init failed.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;ERROR: Initialization error!&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;freshclam locks its log file (&lt;code dir=&quot;auto&quot;&gt;UpdateLogFile&lt;/code&gt; in &lt;code dir=&quot;auto&quot;&gt;freshclam.conf&lt;/code&gt;) while it runs. The service already holds that lock, so a second freshclam process with the same log file cannot start. The error does not tell you whether the service itself updates successfully. Its log does. Rather than starting a second freshclam, you can let the service do its job, restart it, or ask it to check now. ClamUI does the last one: when it sees the freshclam service running, it signals the service to start an update check. If the daily database was out of date, ClamUI then waits up to 60 seconds for a newer version to appear, and warns you if none does.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;on-access-scanning-with-clamonacc&quot;&gt;On-access scanning with clamonacc&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;If you want ClamAV to scan files when they are opened, you need &lt;code dir=&quot;auto&quot;&gt;clamonacc&lt;/code&gt;, the on-access scanner. It is Linux only and needs kernel 3.8 or newer, because it relies on the kernel’s fanotify interface. Some distributions build their kernels without fanotify’s permission events (&lt;code dir=&quot;auto&quot;&gt;CONFIG_FANOTIFY_ACCESS_PERMISSIONS&lt;/code&gt;). clamonacc then still scans and alerts, but it cannot block access to a file.&lt;/p&gt;
&lt;p&gt;How it fits together:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;clamonacc runs as root, because it has to register with the kernel for file events.&lt;/li&gt;
&lt;li&gt;It does not scan anything itself. It passes each event to clamd. So on-access scanning always means running clamd as well, with the memory cost described above.&lt;/li&gt;
&lt;li&gt;With a local clamd, the daemon must run as a user that clamonacc excludes. Otherwise clamd opening a file would trigger another scan of that same file.&lt;/li&gt;
&lt;li&gt;You choose which paths to watch with &lt;code dir=&quot;auto&quot;&gt;OnAccessIncludePath&lt;/code&gt; in &lt;code dir=&quot;auto&quot;&gt;clamd.conf&lt;/code&gt;. ClamAV refuses &lt;code dir=&quot;auto&quot;&gt;/&lt;/code&gt; as a value, because watching the whole system can lock it up.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By default clamonacc only notifies. It reports infected files, but it does not stop the program from opening them. With &lt;code dir=&quot;auto&quot;&gt;OnAccessPrevention yes&lt;/code&gt;, it blocks access to an infected file, and the program trying to open it gets “Operation not permitted”.&lt;/p&gt;
&lt;p&gt;That blocking mode has a real cost. A file access in a watched path can now wait for the scan result. Excluded users and paths and size limits narrow this down, but the waiting stays. ClamAV’s documentation warns that prevention “will seriously impact performance if used on commonly accessed directories”. In practice that means: watch the folders where new files arrive, such as Downloads, and not your whole home folder.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;file-permissions&quot;&gt;File permissions&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;File permissions can stop ClamAV from opening a file or from loading its database.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Files you cannot read.&lt;/strong&gt; A scanner can only check files it is allowed to open. With clamscan, that is you. With clamd, it is the daemon’s user, unless the file is passed with &lt;code dir=&quot;auto&quot;&gt;--fdpass&lt;/code&gt;. Files the scanner cannot open lead to warnings or a scan error. If files were skipped, a clean result only covers what was actually scanned.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A database you cannot read.&lt;/strong&gt; On some installations, the database files are readable only by the &lt;code dir=&quot;auto&quot;&gt;clamav&lt;/code&gt; user and group. Then a plain &lt;code dir=&quot;auto&quot;&gt;clamscan&lt;/code&gt; as your normal user fails before it scans anything, with an error like this:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;LibClamAV Error: cli_load(): Can&apos;t open file /var/lib/clamav/main.cvd&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;clamd is not affected as long as its service account can read the database, which is the usual setup. For clamscan you have two clean options: use clamd instead, or give your user read access, for example through the &lt;code dir=&quot;auto&quot;&gt;clamav&lt;/code&gt; group if that group can read the files on your system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configuration files in unusual places.&lt;/strong&gt; Distributions also differ in where they put the daemon configuration. Fedora, for example, uses &lt;code dir=&quot;auto&quot;&gt;/etc/clamd.d/scan.conf&lt;/code&gt; and a service called &lt;code dir=&quot;auto&quot;&gt;clamd@scan&lt;/code&gt;, not the &lt;code dir=&quot;auto&quot;&gt;/etc/clamav/clamd.conf&lt;/code&gt; that many guides assume.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;where-clamui-fits-in&quot;&gt;Where ClamUI fits in&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;ClamUI is a desktop front end for the ClamAV that is already installed on your system. It does not bring its own copy of ClamAV or its own database. The engine, the tools and the services come from your distribution’s packages, and the signatures are updated by freshclam as usual.&lt;/p&gt;
&lt;p&gt;On top of that, ClamUI does a few specific things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;It picks a scan backend.&lt;/strong&gt; In Auto mode it checks whether clamd answers, and uses it if it does. Otherwise it falls back to clamscan. You can also force one or the other. Daemon scans normally pass files with &lt;code dir=&quot;auto&quot;&gt;--fdpass&lt;/code&gt;, so clamd can scan what you can read. For some locations, such as FUSE mounts, ClamUI streams the content instead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It reports database problems plainly.&lt;/strong&gt; When clamscan fails because it cannot read the database, ClamUI says so in plain words and suggests the daemon backend or read access, for example through the &lt;code dir=&quot;auto&quot;&gt;clamav&lt;/code&gt; group. The original ClamAV message stays in the scan output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It works with the freshclam service.&lt;/strong&gt; As described above, it asks a running update service for a check instead of colliding with it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It changes system settings through a small helper.&lt;/strong&gt; ClamUI runs as your normal user. To change system ClamAV settings such as scanner, database or on-access options, it uses a separate helper that you approve through polkit, the standard Linux mechanism for one-off administrator prompts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Flatpak talks to the host.&lt;/strong&gt; The Flatpak build runs inside a sandbox but needs the ClamAV on your system. Its manifest therefore declares access to the host file system, and it runs the host’s ClamAV tools through &lt;code dir=&quot;auto&quot;&gt;flatpak-spawn --host&lt;/code&gt;. It reads the database location from your host’s ClamAV configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you want to try it, these pages are a good start:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://clamui.com/docs/&quot;&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://clamui.com/docs/installation/&quot;&gt;Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://clamui.com/docs/reference/scan-backends/&quot;&gt;Scan backends&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://clamui.com/docs/troubleshooting/&quot;&gt;Troubleshooting&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>clamav</category><category>linux</category></item></channel></rss>