Permissions problem with Clam AV Log

Discussion in 'Installation/Configuration' started by atjensen11, Dec 26, 2007.

  1. atjensen11

    atjensen11 New Member

    I followed a pretty robust tutorial on installing Postfix with a MySQL backend. In addition to Postfix, Clam AV was installed along with some other scanners.

    All of these email programs run with the user:group as virtual:virtual.

    The problem I am running into is when I restart my server. I believe logrotate is rotating the log files for Clam AV and changing the owner of the log file which changes the permissions.

    The symptom I usually get is messages start backing up in the Postfix queue. There are numerous error messages stating that Postfix cannot connect to the Clam AV process because it does not exist. The process can't start correctly because of the permissions on the /var/log/clamav/clamav.log file.

    Once logrotate touches the file, the ownership is changed to syslog:adm. If I manually change the owner to "virtual", I can manually start the clam av daemon and the Postfix queue empties.

    I want to change it so that my server reboots clean without any manually intervention such as changing the owner on this log file. I don't know exactly how to do this though.

    I did try one thing first. I located the logrotate file for Clam AV and made a small change. Below is the current status of my /etc/logrotate.d/clamav file:
    /var/log/clamav/clamav.log {
         rotate 12
         create 640  virtual adm
         /etc/init.d/clamav-daemon reload-log > /dev/null
  2. falko

    falko Super Moderator ISPConfig Developer

    Did your modification work?
  3. atjensen11

    atjensen11 New Member

    No, my change to the configuration file did not fix my problem. I still have the same symptom which is kind of baffling to me. I thought that would do the trick and get it working correctly.

Share This Page