必须先安装 clamav 扫毒程式,参考文件
http://phorum.vbird.org/view...75809#75809 1.首先将所需套件放置在 /usr/local/src 目录下
samba-vscan-0.3.5-1.tar.bz2 主程式
samba-2.2.8a.tar.gz samba 原始档(含有所需函式库)
2.解压缩、编译及安装
cd /usr/local/src
tar zxvf samba-2.2.8a.tar.gz
cd smaba-2.2.8a/source
./configure
cd ../examples/VFS
tar jxvf /usr/local/src/samba-vscan-0.3.5-1.tar.bz2
cd samba-vscan-0.3.5
./configure
make vscan-clamav.so
cp vscan-clamav.so /usr/lib/samba/vfs
cd clamav
cp vscan-clamav.conf /etc/samba
3.编辑 /etc/samba/smb.conf ,在要扫毒的分享项目,加入扫毒的参数
--------------------------------------------------------
vi /etc/samba/smb.conf
#在要扫毒的分享项目,加入下列两行
vfs object = /usr/lib/samba/vfs/vscan-clamav.so
vfs options = config-file = /etc/samba/vscan-clamav.conf
存档离开 :wq
--------------------------------------------------------
4.编辑 /etc/samba/vscan-clamav.conf 档案,设定使用 clamav 扫毒程式
-------------------------------------------------------
vi /etc/samba/vscan-clamav.conf
将 clamd socket name = /var/run/clamd
libclamav max archived file size = 10 * 1048576
verbose file logging = no
修改为 clamd socket name = /var/run/clamav/clamd.sock
libclamav max archived file size = 30 * 1048576
verbose file logging = yes
存档离开 :wq
-------------------------------------------------------
5.编辑 /etc/clamd.conf ,取消 TCPSocket 设定,改为 LocalSocket
-----------------------------------------------
vi /etc/clamd.conf
将 TCPSocket 3310
#LocalSocket /var/run/clamav/clamd.sock
修改为 #TCPSocket 3310
LocalSocket /var/run/clamav/clamd.sock
存档离开 :wq
-----------------------------------------------
6.重新启动 samba
/etc/rc.d/init.d/smb restart
7.重新启动 clamav
/etc/rc.d/init.d/clamd restart
_________________
~ 成功者绝不放弃,放弃者绝不成功 ~
...................@_@