\uD83E\uDD14 Problem
Ubuntu/Linux’s AppArmor may prevent access to file or directory causing Anti-Virus scanner to throw an error.
\uD83C\uDF31 Solution
Few ways to prevent this error:
Disabling AppArmor
sudo systemctl stop apparmor.service
sudo systemctl disable apparmor.service
Set AppArmor to complain instead of denying access
apt-get install apparmor-utils
aa-complain /path/to/your/scanner
(e.g./usr/sbin/clamd
)
\uD83D\uDCCE Related articles
https://superuser.com/questions/671116/why-clamav-cant-scan-some-files