我只是使用这些指示从Debian 10升级到Debian 11。一切似乎都进行得很顺利,除了麦迪特失败了。
这是一个错误:
maldet[2117]: maldet(2117): {mon} kernel does not support inotify(), aborting
systemd[1]: maldet.service: Can't open PID file /usr/local/maldetect/tmp/inotifywait.pid (yet?) after start: Operation not permitted
systemd[1]: maldet.service: Failed with result 'protocol'.
systemd[1]: Failed to start Linux Malware Detect monitoring - maldet.My /usr/lib/systemd/system/maldet.service文件包含:
[Unit]
Description=Linux Malware Detect monitoring - maldet
After=network.target
[Service]
EnvironmentFile=/usr/local/maldetect/conf.maldet
ExecStart=/usr/local/maldetect/maldet --monitor USERS
ExecStop=/usr/local/maldetect/maldet --kill-monitor
Type=forking
PIDFile=/usr/local/maldetect/tmp/inotifywait.pid
[Install]
WantedBy=multi-user.target在更新之前,我验证了所有服务都正常工作,在更新过程中选择了"N“否,拒绝替换我的自定义配置文件.所以什么都不应该改变。
另外,我使用的是Linux5.10.0-8-AMD 64和maldet 1.6.4。
有人能帮我弄清楚吗?谢谢
发布于 2021-09-27 09:18:12
问题是文件/usr/local/maldetect/internals/functions中的条件:
if [ -f "/boot/System.map-$(uname -r)" ]; then
ksup=`grep -i inotify_ /boot/System.map-$(uname -r)`
if [ -z "$ksup" ]; then
eout "{mon} kernel does not support inotify(), aborting." 1
exit
fi
elif [ -f "/boot/config-$(uname -r)" ]; then
ksup=`grep -m1 CONFIG_INOTIFY /boot/config-$(uname -r)`
if [ -z "$ksup" ]; then
eout "{mon} kernel does not support inotify(), aborting." 1
exit
fi
fi它正在对文件/boot/System.map-$(uname -r)执行grep,但是在Debian 11中,内容是ffffffffffffffff B The real System.map is in the linux-image--dbg package。
我看到了两个快速解决方案,第一个是检查适当的文件:
apt install linux-image-$(uname -r)-dbg为正在运行的内核安装dbg包sed -i 's#/boot/System.map#/lib/debug/boot/System.map#' /usr/local/maldetect/internals/functions替换条件的文件路径以指向好的条件为了避免安装dbg包,另一种解决方案是删除第一个条件,而只使用签入/boot/config-$(uname -r)的第二个条件。
我用了第一个测试,现在开始了。这两种解决方案都应该在等待最终解决方案时起作用。
问候
https://serverfault.com/questions/1077310
复制相似问题