我在 Debian 11 上安装了 clamav-daemon,当我尝试启动它时,它不会创建 LocalSocket /var/run/clamd.ctl。
我的 /etc/clamav/clamd.conf 中的 LocalSocket:
本地套接字 /var/run/clamav/clamd.ctl
systemctl status clamav-daemon.service 带来:
● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d
└─extend.conf, override.conf
Active: active (running) since Fri 2023-02-17 15:55:18 CET; 34min ago
Docs: man:clamd(8)
man:clamd.conf(5)
https://docs.clamav.net/
Process: 37394 ExecStartPre=/bin/mkdir -p /run/clamav (code=exited, status=0/SUCCESS)
Process: 37395 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS) Main PID: 37396 (clamd)
Tasks: 1 (limit: 1129)
Memory: 489.8M
CPU: 52.996s
CGroup: /system.slice/clamav-daemon.service
└─37396 /usr/sbin/clamd --foreground=true
Feb 17 15:55:18 cc700x-irmler systemd[1]: clamav-daemon.service: Consumed 11.193s CPU time. Feb 17 15:55:18 cc700x-irmler systemd[1]: Starting Clam AntiVirus userspace daemon... Feb 17 15:55:18 cc700x-irmler systemd[1]: Started Clam AntiVirus userspace daemon.
因此,一切似乎都很好。但是:systemctl status clamav-daemon.socket 带来:
找不到单元 clamav-daemon.socket。
/var/log/clamav/clamav.log 带来(启动时):
Fri Feb 17 15:55:19 2023 -> +++ Started at Fri Feb 17 15:55:19 2023
Fri Feb 17 15:55:19 2023 -> Received 0 file descriptor(s) from
systemd. Fri Feb 17 15:55:19 2023 -> clamd daemon 0.103.7 (OS:
linux-gnu, ARCH: x86_64, CPU: x86_64) Fri Feb 17 15:55:19 2023 -> Log
file size limited to 4294967295 bytes. Fri Feb 17 15:55:19 2023 ->
Reading databases from /var/lib/clamav Fri Feb 17 15:55:19 2023 -> Not
loading PUA signatures. Fri Feb 17 15:55:19 2023 -> Bytecode: Security
mode set to "TrustSigned". Fri Feb 17 16:08:12 2023 -> Loaded 8652992
signatures.
/var/log/clamav/clamav-milter.log 带来(因为缺少 /var/run/clamav/clamd.ctl):
Fri Feb 17 16:27:05 2023 -> WARNING: No clamd server appears to be
available Fri Feb 17 16:28:05 2023 -> WARNING: No clamd server appears
to be available Fri Feb 17 16:29:04 2023 -> WARNING: No clamd server
appears to be available Fri Feb 17 16:30:03 2023 -> WARNING: No clamd
server appears to be available Fri Feb 17 16:31:02 2023 -> WARNING: No
clamd server appears to be available Fri Feb 17 16:32:01 2023 ->
WARNING: No clamd server appears to be available
/var/run/ 的权限是为用户“clamav”和组“root”设置的。clamav 也是运行该进程的用户:
ps aux | grep clamav
clamav 500 0.0 0.0 58248 704 ? Ss 14:22 0:00
/usr/bin/freshclam -d --foreground=true clamav 31064 0.0 0.0
349480 52 ? Ssl 14:55 0:00 /usr/sbin/clamav-milter
--config-file=/etc/clama v/clamav-milter.conf clamav 37396 2.2 42.5 1395520 425952 ? Ds 15:55 0:55 /usr/sbin/clamd --foreground=true root 38870 0.0 0.0 6244 700 pts/1 S+ 16:36 0:00 grep clamav
我已经尝试过清除/安装,也尝试过 --reinstall clamav 和 clamav-daemon,还尝试过在 clamav-daemon 上使用 dpkg-reconfigure。我还尝试过干净重启。但情况没有任何改变。
我不知道还能尝试什么。有人有想法吗?非常感谢!