Friday, June 09, 2006

Samba + antivĂ­rus

Fisrt you need to install clamav AV.
# cd /usr/ports/security/clamav
# make install clean

then install samba-vscan
# cd /usr/ports/security/samba-vscan
# make install clean

If you are using samba 3.X:

Edit /usr/local/etc/smb.conf and add the following entry (that's only an example):

[share]
comment = virus-protected /tmp directory
path = /tmp
vfs object = vscan-oav
vscan-oav: config-file = /usr/local/etc/samba-vscan/vscan-oav.conf
writeable = yes
browseable = yes
guest ok = yes

Basically you have to add a vfs object line to your shares which should be virus-protected by this module. If you'd like to use the run-time configuration file, simply add the vfs options = config-file = /path/config-file (different settings for several shares can be achieved by using a different name of the configuration file for each share). If you want to protect _all_ shares your Samba server offers, simply add the vfs object line (and the vfs options line, if you like) to the [global] section.

Then restart samba.

0 Comments:

Post a Comment

<< Home