Este guia mostra como permitir que o usuário thiagozs
execute o freshclam
sem precisar de permissões de root, corrigindo o erro:
ERROR: Failed to open log file /var/log/clamav/freshclam.log: Permission denied
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
sudo usermod -aG clamav thiagozs
sudo chown -R clamav:clamav /var/log/clamav
sudo chmod -R 775 /var/log/clamav
sudo touch /var/log/clamav/freshclam.log
sudo chown clamav:clamav /var/log/clamav/freshclam.log
sudo chmod 664 /var/log/clamav/freshclam.log
newgrp clamav
freshclam
ClamAV update process started at Thu Aug 14 14:19:05 2025
daily database available for update (local version: 27725, remote version: 27732)
Downloading database patch # 27726...
...
Database test passed.
daily.cld updated (version: 27732, sigs: 2076427, f-level: 90, builder: raynman)
main.cvd database is up-to-date
bytecode.cld database is up-to-date
Clamd successfully notified about the update.
Agora o freshclam
pode ser executado diretamente pelo usuário thiagozs
sem necessidade de root.