cvsextras 47272f4
To create individual clamd-instance take the following files and
cvsextras 47272f4
modify/copy them in the suggested way:
cvsextras 47272f4
6151a28
clamd.conf:
cvsextras 47272f4
  * set LogFile, PidFile, LocalSocket and User to suitable values
69e78d8
  * place this file into /etc/clamd.d with an unique service-name;
cvsextras 47272f4
    e.g. as /etc/clamd.d/<SERVICE>.conf
cvsextras 47272f4
cvsextras 47272f4
  To make logfile rotation work properly, the LogFile should be
cvsextras 47272f4
  writable for the assigned User. Recommended way to reach this, is
cvsextras 47272f4
  to:
cvsextras 47272f4
  * make it owned by the User's *group*
cvsextras 47272f4
  * assign at least 0620 (u+rw,g+w) permissions
cvsextras 47272f4
cvsextras 47272f4
  A suitable command might be
cvsextras 47272f4
  | # touch <logfile>
cvsextras 47272f4
  | # chgrp <user> <logfile>
cvsextras 47272f4
  | # chmod 0620   <logfile>
cvsextras 47272f4
cvsextras 47272f4
  NEVER use 'clamav' as the user since he can modify the database.
cvsextras 47272f4
  This is the user who is running the application; e.g. for mimedefang
cvsextras 47272f4
  (http://www.roaringpenguin.com/mimedefang), the user might be
cvsextras 47272f4
  'defang'.Theoretically, distinct users could be used, but it must be
cvsextras 47272f4
  made sure that the application-user can write into the socket-file,
cvsextras 47272f4
  and that the clamd-user can access the files asked by the
cvsextras 47272f4
  application to be checked.
cvsextras 47272f4
cvsextras 47272f4
cvsextras 47272f4
clamd.logrotate:
cvsextras 47272f4
  * set the correct value for the logfile
cvsextras 47272f4
  * place it into /etc/logrotate.d
cvsextras 47272f4
cvsextras 47272f4
clamd.sysconfig:
cvsextras 47272f4
  * set the name of the config-file and the local socket
cvsextras 47272f4
  * copy it to /etc/sysconfig/clamd.<SERVICE>
cvsextras 47272f4
cvsextras 47272f4
clamd.init:
cvsextras 47272f4
  * set the service-name
cvsextras 47272f4
  * place it into /etc/init.d/ with an unique name and activate it
cvsextras 47272f4
    (e.g. with /sbin/chkconfig clamd.<SERVICE> on)
cvsextras 47272f4
cvsextras 47272f4
Additionally, a symlink must be set to clamd in a way like
cvsextras 47272f4
  | # ln -s clamd /usr/sbin/clamd.<SERVICE>
cvsextras 47272f4
and the directory for the socket file must be created (see 'LocalSocket'
6151a28
in clamd.conf)
cvsextras 47272f4
  | # mkdir -p /var/run/clamd.<SERVICE>
cvsextras 47272f4
cvsextras 47272f4
cvsextras 47272f4
This directory must be writable by the 'User' chosen in the config-file.
cvsextras 47272f4
cvsextras 47272f4
cvsextras 47272f4
cvsextras 47272f4
[Disclaimer:
cvsextras 47272f4
 this file and the script/configfiles are not part of the official
cvsextras 47272f4
 clamav package.
cvsextras 47272f4
cvsextras 47272f4
 Please send complaints and comments to
cvsextras 47272f4
 mailto:enrico.scholz@informatik.tu-chemnitz.de!]