当我在终端输入以下内容时:
sudo mkdir /var/log/clamav
sudo chown -R clamav:adm /var/log/clamav/
sudo chown -R clamav:clamav /var/log/clamav/
sudo freshclam
运行这些命令后,我可以成功获取病毒更新。但是,一段时间后我收到错误。
我认为使用 STACER 应用程序清理系统后(实际上没有必要清理)
joso@joso-aspirees1433:~$ sudo freshclam
[sudo] password for joso:
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
joso@joso-aspirees1433:~$
但是我在终端运行命令后,它给出了更新的 freshclam:
joso@joso-aspirees1433:~$ sudo su
[sudo] password for joso:
root@joso-aspirees1433:/home/joso# sudo mkdir /var/log/clamav
root@joso-aspirees1433:/home/joso# sudo chown -R clamav:adm /var/log/clamav/
root@joso-aspirees1433:/home/joso# sudo chown -R clamav:clamav /var/log/clamav/
root@joso-aspirees1433:/home/joso# sudo freshclam
Tue Oct 26 06:53:26 2021 -> ClamAV update process started at Tue Oct 26 06:53:26 2021
Tue Oct 26 06:53:26 2021 -> daily.cld database is up-to-date (version: 26333, sigs: 1939856, f-level: 90, builder: raynman)
Tue Oct 26 06:53:26 2021 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Tue Oct 26 06:53:26 2021 -> bytecode.cvd database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)
root@joso-aspirees1433:/home/joso#
我如何保持这些设置永久有效?