avast for linux business 4.0.3 on Ubuntu 20.04 focal
Starting via systemd: (“avast.target
A meta unit linked in all avast services. Restarting this unit restarts all avast daemons, and
recreates sockets. Enabling it enables everything Avast antivirus needs to operate.”)
creates sockets but fails when trying to scan sth:
root@wastl:~# systemctl restart avast.target
root@wastl:~# ls /run/avast
emsg.sock scan.sock
root@wastl:~# scan -i /tmp/eicar.com
read(): Connection reset by peer
and the sockets are gone.
We have reports that this might happen in some cases.
There are several possible fixes:
change the ownership of all /var/lib/avast/ to avast:avast
remove contents of /var/lib/avast/defs and manually trigger avast-vpsupdate.service (systemctl start avast-vpsupdate.service. It will take a while as it redownloads the complete detection database)
change the user and group of the service to root by editing the unit file (systemctl edit avast.service)
uninstall and install the avast package. (not a reinstall) . This should in effect be the equivalent of removing the /var/lib/avast/defs/ directory.
I’d recommend first trying to remove /var/lib/avast/defs and reinitializing the detection database. If that doesn’t work, reinstall, and the permissions should be set up correctly.
I realized however some files in /var/lib/avast belonged to root. So I applied the first suggestion and recursively chowned everything under /var/lib/avast to avast:avast.
That fixed the thing.
Thanks!
That’s interesting.
We’d be very grateful if you could describe some of the machine’s history, to figure out how the root files got there.
Important events: distribution upgrade, Avast 3.X → 4.X migration.
Great you got it sorted, and thanks in advance for any information.