2012年3月22日木曜日

freshclamがエラー

またもや、起動時に下記のエラーが出力されていた。
何度も発生しているのですが、面倒だったのでパッケージを再インストールで面倒を逃れていたが、そろそろ対応しないと...

LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days.  ***
LibClamAV Warning: ***        Please update it IMMEDIATELY!       ***
LibClamAV Warning: **************************************************

とりあえず、今までも何度か試した事がある方法を記録(実施)します。
ウィルスDBが古いというので、お決まりの freshclma を実行する。
[root@hoge ~]# 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).
ログが追加できない? ログファイルを確認してみる
[root@hoge clamav]# ls -il
合計 352
360450 -rw-r--r-- 1 clamav clamav 29524  3月 22 03:52 clamd.log
360460 -rw-r--r-- 1 clam   clam   48441  3月 17 04:32 clamd.log.1
360458 -rw-r--r-- 1 clam   clam   63309  3月 11 14:17 clamd.log.2
360456 -rw-r--r-- 1 clam   clam   60929  3月  4 05:35 clamd.log.3
360454 -rw-r--r-- 1 clam   clam   63473  2月 26 04:02 clamd.log.4
360452 -rw-r--r-- 1 clamav clamav     0  3月 18 09:47 freshclam.log
360451 -rw-r--r-- 1 clam   clam    5922  3月 18 09:47 freshclam.log.1
360459 -rw-r--r-- 1 clam   clam    6134  3月 11 14:17 freshclam.log.2
360457 -rw-r--r-- 1 clam   clam    6791  3月  4 05:35 freshclam.log.3
360455 -rw-r--r-- 1 clam   clam    5754  2月 26 04:02 freshclam.log.4
[root@hoge clamav]# 
ログがアーカイブされるとユーザーが clamav から clam に変わっている。なんでなの?

ログアーカイブファイルのオーナーとグループを clamav に変更して freshclam を実行してみる。

[root@hoge clamav]# chown clamav:clamav *
[root@hoge clamav]# ls -il
合計 352
360450 -rw-r--r-- 1 clamav clamav 29524  3月 22 03:52 clamd.log
360460 -rw-r--r-- 1 clamav clamav 48441  3月 17 04:32 clamd.log.1
360458 -rw-r--r-- 1 clamav clamav 63309  3月 11 14:17 clamd.log.2
360456 -rw-r--r-- 1 clamav clamav 60929  3月  4 05:35 clamd.log.3
360454 -rw-r--r-- 1 clamav clamav 63473  2月 26 04:02 clamd.log.4
360452 -rw-r--r-- 1 clamav clamav     0  3月 18 09:47 freshclam.log
360451 -rw-r--r-- 1 clamav clamav  5922  3月 18 09:47 freshclam.log.1
360459 -rw-r--r-- 1 clamav clamav  6134  3月 11 14:17 freshclam.log.2
360457 -rw-r--r-- 1 clamav clamav  6791  3月  4 05:35 freshclam.log.3
360455 -rw-r--r-- 1 clamav clamav  5754  2月 26 04:02 freshclam.log.4
[root@hoge ~]# 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).
次に、ログをすべて削除してから freshclam を実行する。
[root@ora02 clamav]# rm -f *
[root@ora02 clamav]# ls
[root@ora02 ~]# freshclam
ClamAV update process started at Thu Mar 22 04:48:54 2012
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
Downloading daily-14651.cdiff [100%]
Downloading daily-14652.cdiff [100%]
Downloading daily-14653.cdiff [100%]
Downloading daily-14654.cdiff [100%]
Downloading daily-14655.cdiff [100%]
Downloading daily-14656.cdiff [100%]
Downloading daily-14657.cdiff [100%]
Downloading daily-14658.cdiff [100%]
Downloading daily-14659.cdiff [100%]
Downloading daily-14660.cdiff [100%]
Downloading daily-14661.cdiff [100%]
Downloading daily-14662.cdiff [100%]
Downloading daily-14663.cdiff [100%]
Downloading daily-14664.cdiff [100%]
Downloading daily-14665.cdiff [100%]
Downloading daily-14666.cdiff [100%]
Downloading daily-14667.cdiff [100%]
Downloading daily-14668.cdiff [100%]
Downloading daily-14669.cdiff [100%]
Downloading daily-14670.cdiff [100%]
Downloading daily-14671.cdiff [100%]
Downloading daily-14672.cdiff [100%]
Downloading daily-14673.cdiff [100%]
Downloading daily-14674.cdiff [100%]
Downloading daily-14675.cdiff [100%]
Downloading daily-14676.cdiff [100%]
Downloading daily-14677.cdiff [100%]
Downloading daily-14678.cdiff [100%]
Downloading daily-14679.cdiff [100%]
Downloading daily-14680.cdiff [100%]
Downloading daily-14681.cdiff [100%]
Downloading daily-14682.cdiff [100%]
daily.cld updated (version: 14682, sigs: 134958, f-level: 63, builder: jesler)
Downloading bytecode-145.cdiff [100%]
Downloading bytecode-146.cdiff [100%]
Downloading bytecode-147.cdiff [100%]
Downloading bytecode-148.cdiff [100%]
Downloading bytecode-149.cdiff [100%]
Downloading bytecode-150.cdiff [100%]
Downloading bytecode-151.cdiff [100%]
Downloading bytecode-152.cdiff [100%]
Downloading bytecode-153.cdiff [100%]
Downloading bytecode-154.cdiff [100%]
Downloading bytecode-155.cdiff [100%]
Downloading bytecode-156.cdiff [100%]
Downloading bytecode-157.cdiff [100%]
Downloading bytecode-158.cdiff [100%]
Downloading bytecode-159.cdiff [100%]
Downloading bytecode-160.cdiff [100%]
Downloading bytecode-161.cdiff [100%]
Downloading bytecode-162.cdiff [100%]
Downloading bytecode-163.cdiff [100%]
Downloading bytecode-164.cdiff [100%]
Downloading bytecode-165.cdiff [100%]
Downloading bytecode-166.cdiff [100%]
Downloading bytecode-167.cdiff [100%]
Downloading bytecode-168.cdiff [100%]
bytecode.cld updated (version: 168, sigs: 38, f-level: 63, builder: edwin)
Database updated (1179383 signatures) from db.jp.clamav.net (IP: 203.178.137.175)
WARNING: Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.sock
connect(): No such file or directory
[root@ora02 ~]# freshclam
ClamAV update process started at Thu Mar 22 04:53:37 2012
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cld is up to date (version: 14682, sigs: 134958, f-level: 63, builder: jesler)
bytecode.cld is up to date (version: 168, sigs: 38, f-level: 63, builder: edwin)
[root@hoge ~]# 

0 件のコメント:

コメントを投稿