2013年6月30日 星期日

[備忘]Clamav freshclam doesn't update

轉貼來自於http://jerryclc.blogspot.tw/2012/06/etccron.html
Clamav freshclam doesn't update  Error message as below

ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).



Modify "/etc/cron.daily/freshclam
==============================

#!/bin/sh

### A simple update script for the clamav virus database.
### This could as well be replaced by a SysV script.

### fix log file if needed
LOG_FILE="/var/log/clamav/freshclam.log"
if [ ! -f "$LOG_FILE" ]; then
    touch "$LOG_FILE"
    chmod 644 "$LOG_FILE"
   // modify chown clam.clam ==> clamav.clamav
    chown clamav.clamav "$LOG_FILE"
fi

/usr/bin/freshclam \
    --quiet \
    --datadir="/var/lib/clamav" \
    --log="$LOG_FILE"

沒有留言: