cPanel

Can’t open freshclam.log in append mode

:: Error in cronjob

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!).

:: How to fix clamav can’t open /var/log/clamav/freshclam.log in append mode in cPanel server
+ Check permission in log files

ls -lh /var/log/clamav/
-rw-r--r--  1 clam clam    0 Jun 29 03:32 freshclam.log
-rw-r-----  1 clam clam 5.2K Jun 26  2014 freshclam.log-20140629

+ Change Database Owner

vim /usr/local/cpanel/3rdparty/etc/freshclam.conf

# By default when started freshclam drops privileges and switches to the
# "clamav" user. This directive allows you to change the database owner.
# Default: clamav (may depend on installation options)
DatabaseOwner clam

+ Change Clamd User

vim /usr/local/cpanel/3rdparty/etc/clamd.conf

# Run as another user (clamd must be started by root for this option to work)
# Default: don't drop privileges
User clam

:: Ref
+ Google
+ ServerTechNet

Hi, I’m Sysadmin.ID

Leave a Reply

Your email address will not be published. Required fields are marked *