Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-14-2009, 02:47 AM   #1
Registered: Mar 2008
Distribution: RedHatES4
Posts: 144

Rep: Reputation: 15
Can't open /var/log/clamav/freshclam.log in append mode

I keep getting the message:


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


### fix log file if needed
if [ ! -f "$LOG_FILE" ]; then
touch "$LOG_FILE"
chmod 660 "$LOG_FILE"
chown amavis.amavis "$LOG_FILE"

/usr/bin/freshclam \
--quiet \
--datadir="/var/clamav" \
--log="$LOG_FILE" \
# --log-verbose \
# --daemon-notify="/etc/clamd.conf"


-rw-rw---- 1 amavis amavis 1340244 May 26 16:01 clamav-milter.log
-rw-rw---- 1 amavis amavis 6486 Jun 7 04:02 freshclam.log.4
-rw-rw---- 1 amavis amavis 49541 Jun 7 04:02 clamd.log.4
-rw-rw---- 1 amavis amavis 465 Jun 29 08:13 clamd.log.3
-rw-rw---- 1 amavis amavis 2934 Jun 30 04:02 freshclam.log.3
-rw-rw---- 1 amavis amavis 6128 Jul 5 04:02 freshclam.log.2
-rw-rw---- 1 amavis amavis 16522 Jul 5 04:02 clamd.log.2
-rw-rw---- 1 amavis amavis 11463 Jul 12 04:02 freshclam.log.1
-rw-r--r-- 1 clamav clamav 0 Jul 12 04:02 freshclam.log
-rw-rw---- 1 amavis amavis 59905 Jul 12 04:02 clamd.log.1
-rw-r--r-- 1 clamav clamav 0 Jul 12 04:02 clamd.log
drwxr-xr-x 2 amavis amavis 4096 Jul 12 04:02 .
drwxr-xr-x 9 root root 4096 Jul 12 04:02 ..

Clamd.conf and amavisd.conf are set to use amavis as the user account
clamd.conf has AllowSupplementaryGroups yes

I am not clear why clamd.log and freshclam keep changing permission and ownership to clamav.Anyone got ideas please?
Old 07-14-2009, 04:57 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,640

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
That's an email scrubber.

They all fart about with permissions because They want to have low permissions in case they get compromised(hacked). Sendmail and Bind run as root, which is a bad idea really. If you hack them, you have root. So all secure mail thingys change from one powerless user to another and then finally end up as the user who is getting the mail to drop it in his postbox.

None of the files matter there except freshclam.log That's owned by clamav:clamav, and the script cannot change it to amavis:amavis I guess.

As root, try 'chown amavis:amavis freshclam.log' and then restart.
Old 07-14-2009, 06:06 AM   #3
Registered: Mar 2008
Distribution: RedHatES4
Posts: 144

Original Poster
Rep: Reputation: 15
I have done chown amavis:amavis freshclam.log many time previously and it sorts itself out for a few days and then reverts to changing ownership to clamav. In the cron.daily the permission is set to 660, however the freshclam.log reverts to 644. What else could be involved here. It is more of an irritation issue for me.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
the significance and name of the 5th column of /var/log/auth.log (ubuntu server)? CoffeeKing!!! Linux - Security 4 02-05-2009 08:32 AM
What the %$#@ is pam_unix (cron:session) doing every ten minutes? (/var/log/auth.log) CoffeeKing!!! Linux - Security 3 02-05-2009 08:07 AM
/var/log/messages and /var/log/cron not working sigkill Linux - Software 6 08-09-2008 02:08 PM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 05:13 PM
ClamAV (Freshclam) config problem - cannot append to log file tp11235 Linux - Security 6 09-29-2006 04:54 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration