LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 07-14-2009, 01:47 AM   #1
i_nomad
Member
 
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:


"/etc/cron.daily/freshclam:

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


/etc/cron.daily/freshclam

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

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

/var/log/clamav

-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, 03:57 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,267

Rep: Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540
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, 05:06 AM   #3
i_nomad
Member
 
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.
 
  


Reply


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 07:32 AM
What the %$#@ is pam_unix (cron:session) doing every ten minutes? (/var/log/auth.log) CoffeeKing!!! Linux - Security 3 02-05-2009 07:07 AM
/var/log/messages and /var/log/cron not working sigkill Linux - Software 6 08-09-2008 01: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 04:13 PM
ClamAV (Freshclam) config problem - cannot append to log file tp11235 Linux - Security 6 09-29-2006 03:54 PM


All times are GMT -5. The time now is 02:57 AM.

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