IcA*_*IcA 6 permissions clamav
如果我/etc/clamav/freshclam.conf像这样注释掉 UpdateLogFile 行...
\#UpdateLogFile /var/log/clamav/freshclam.log
Run Code Online (Sandbox Code Playgroud)
...然后我可以运行 sudo freshclam 没问题:
/etc/clamav$ sudo freshclam ClamAV update process started at Mon Feb
6 00:17:07 2017 main.cvd is up to date (version: 57, sigs: 4218790,
f-level: 60, builder: amishhammer) daily.cld is up to date (version:
23009, sigs: 1509149, f-level: 63, builder: neo) bytecode.cld is up to
date (version: 290, sigs: 55, f-level: 63, builder: neo)
Run Code Online (Sandbox Code Playgroud)
但是,如果我取消注释 freshclam.conf 中的 UpdateLogFile 行并运行 sudo freshclam,我会得到:
/etc/clamav$ sudo freshclam
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).
Run Code Online (Sandbox Code Playgroud)
以下是权限/var/log:
drwxrwxrwx 1 root root 9 Feb 3 2016 log
Run Code Online (Sandbox Code Playgroud)
以下是权限/var/log/clamav:
drwxr-xr-x 2 clamav clamav 4096 Feb 5 22:18 clamav
Run Code Online (Sandbox Code Playgroud)
以下是权限/var/log/clamav/freshclam.log:
-rw-r----- 1 clamav adm 0 Feb 5 22:18 freshclam.log
Run Code Online (Sandbox Code Playgroud)
我花了一整天的时间尝试各种论坛中提到的解决方案,但没有运气。
这是我正在运行的 Ubuntu 服务器版本:
Description: Ubuntu 14.04.5 LTS
Run Code Online (Sandbox Code Playgroud)
和 clamav 的引擎版本:
Engine version: 0.99.2
Run Code Online (Sandbox Code Playgroud)
有人可以帮助我吗?
停止 clamav-daemon 没有帮助:
/var/log$ sudo /etc/init.d/clamav-daemon stop
* Stopping ClamAV daemon clamd
[ OK ] /var/log$ sudo freshclam
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).
Run Code Online (Sandbox Code Playgroud)
的输出sudo lsof | grep clam是什么:
/var/log$ sudo lsof | grep clam
/var/log$
Run Code Online (Sandbox Code Playgroud)
似乎什么都没有锁定 /var/log/clamav/freshclam.log
这是 的输出sudo service --status-all | grep clamav,不包括带有问号且与 clamav 无关的行:
$ sudo service --status-all | grep clamav
[ - ] clamav-daemon
[ - ] clamav-freshclam
$
Run Code Online (Sandbox Code Playgroud)
Can't open /var/log/clamav/freshclam.log in append mode (check permissions!)当我尝试运行 clamav-daemon 时出现同样的错误:
$ sudo service clamav-daemon start
* Starting ClamAV daemon clamd
ERROR: Can't open /var/log/clamav/clamav.log in append mode (check permissions!).
ERROR: Can't initialize the internal logger
$
Run Code Online (Sandbox Code Playgroud)
更新:清除并重新安装clamav,clamav-freshclam并clamav-daemon没有解决问题。我仍然收到相同的错误:
$ sudo freshclam
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).
$
Run Code Online (Sandbox Code Playgroud)
更新2:我做了一个sudo reboot,停止了clamav-freshclam,确保sudo lsof | grep clam没有返回任何东西,并且输出sudo service --status-all | grep clamav仍然只有减号clamav和旁边的符号clamav-daemon。冉sudo freshclam再次,和相同的错误如上述(再次)。