1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="vfs_virusfilter.8">
6 <refentrytitle>vfs_virusfilter</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">4.8</refmiscinfo>
15 <refname>vfs_virusfilter</refname>
16 <refpurpose>On access virus scanner</refpurpose>
21 <command>vfs objects = virusfilter</command>
26 <title>DESCRIPTION</title>
28 <para>This is a set of various Samba VFS modules to scan and filter
29 virus files on Samba file services with an anti-virus scanner.</para>
31 <para>This module is stackable.</para>
36 <title>OPTIONS</title>
41 <term>virusfilter:scanner</term>
43 <para>The antivirus scan-engine.</para>
45 <listitem><para><emphasis>sophos</emphasis>, the Sophos AV
46 scanner</para></listitem>
47 <listitem><para><emphasis>fsav</emphasis>, the F-Secure AV
48 scanner</para></listitem>
49 <listitem><para><emphasis>clamav</emphasis>, the ClamAV
50 scanner</para></listitem>
56 <term>virusfilter:socket path = PATH</term>
58 <para>Path of local socket for the virus scanner.
60 <para>If this option is not set, the default path depends on the
61 configured AV scanning engine.
63 <para>For the <emphasis>sophos</emphasis>backend the default is
64 <emphasis>/var/run/savdi/sssp.sock</emphasis>.</para>
65 <para>For the <emphasis>fsav</emphasis> backend the default is
66 <emphasis>/tmp/.fsav-0</emphasis>.</para>
67 <para>For the <emphasis>fsav</emphasis> backend the default is
68 <emphasis>/var/run/clamav/clamd.ctl</emphasis>.</para>
73 <term>virusfilter:connect timeout = 30000</term>
75 <para>Controls how long to wait on connecting to the virus
76 scanning process before timing out. Value is in milliseconds.
78 <para>If this option is not set, the default is 30000.</para>
83 <term>virusfilter:io timeout = 60000</term>
85 <para>Controls how long to wait on communications with the virus
86 scanning process before timing out. Value is in milliseconds.
88 <para>If this option is not set, the default is 60000.</para>
93 <term>virusfilter:scan on open = yes</term>
95 <para>This option controls whether files are scanned on open.
97 <para>If this option is not set, the default is yes.</para>
102 <term>virusfilter:scan on close = no</term>
104 <para>This option controls whether files are scanned on close.
106 <para>If this option is not set, the default is no.</para>
111 <term>virusfilter:max file size = 100000000</term>
113 <para>This is the largest sized file, in bytes, which will be scanned.
115 <para>If this option is not set, the default is 100MB.</para>
120 <term>virusfilter:min file size = 10</term>
122 <para>This is the smallest sized file, in bytes, which will be scanned.
124 <para>If this option is not set, the default is 10.</para>
129 <term>virusfilter:infected file action = nothing</term>
131 <para>What to do with an infected file. The options are
132 nothing, quarantine, rename, delete.</para>
133 <para>If this option is not set, the default is nothing.</para>
138 <term>virusfilter:infected file errno on open = EACCES</term>
140 <para>What errno to return on open if the file is infected.
142 <para>If this option is not set, the default is EACCES.</para>
147 <term>virusfilter:infected file errno on close = 0</term>
149 <para>What errno to return on close if the file is infected.
151 <para>If this option is not set, the default is 0.</para>
156 <term>virusfilter:quarantine directory = PATH</term>
158 <para>Where to move infected files. This path must be an
159 absolute path.</para>
160 <para>If this option is not set, the default is ".quarantine"
161 relative to the share path. </para>
166 <term>virusfilter:quarantine prefix = virusfilter.</term>
168 <para>Prefix for quarantined files.</para>
169 <para>If this option is not set, the default is "virusfilter.".</para>
174 <term>virusfilter:quarantine suffix = .infected</term>
176 <para>Suffix for quarantined files.
177 This option is only used if keep name is true. Otherwise it is ignored.</para>
178 <para>If this option is not set, the default is ".infected".</para>
183 <term>virusfilter:rename prefix = virusfilter.</term>
185 <para>Prefix for infected files.</para>
186 <para>If this option is not set, the default is "virusfilter.".</para>
191 <term>virusfilter:rename suffix = .infected</term>
193 <para>Suffix for infected files.</para>
194 <para>If this option is not set, the default is ".infected".</para>
199 <term>virusfilter:quarantine keep tree = yes</term>
201 <para>If keep tree is set, the directory structure relative
202 to the share is maintained in the quarantine directory.
204 <para>If this option is not set, the default is yes.</para>
209 <term>virusfilter:quarantine keep name = yes</term>
211 <para>Should the file name be left unmodified other than adding a suffix
212 and/or prefix and a random suffix name as defined in virusfilter:rename prefix
213 and virusfilter:rename suffix.</para>
214 <para>If this option is not set, the default is yes.</para>
219 <term>virusfilter:infected file command = @SAMBA_DATADIR@/bin/virusfilter-notify --mail-to virusmaster@example.com --cc "%U@example.com" --from samba@example.com --subject-prefix "Samba: Infected File: "</term>
221 <para>External command to run on an infected file is found.</para>
222 <para>If this option is not set, the default is none.</para>
227 <term>virusfilter:scan archive = true</term>
229 <para>This defines whether or not to scan archives.</para>
230 <para>Sophos and F-Secure support this and it defaults to false.</para>
235 <term>virusfilter:max nested scan archive = 1</term>
237 <para>This defines the maximum depth to search nested archives.</para>
238 <para>The Sophos and F-Secure support this and it defaults to 1.</para>
243 <term>virusfilter:scan mime = true</term>
245 <para>This defines whether or not to scan mime files.</para>
246 <para>Only the <emphasis>fsav</emphasis>scanner supports this
247 option and defaults to false.</para>
252 <term>virusfilter:scan error command = @SAMBA_DATADIR@/bin/virusfilter-notify --mail-to virusmaster@example.com --from samba@example.com --subject-prefix "Samba: Scan Error: "</term>
254 <para>External command to run on scan error.</para>
255 <para>If this option is not set, the default is none.</para>
260 <term>virusfilter:exclude files = empty</term>
262 <para>Files to exclude from scanning.</para>
263 <para>If this option is not set, the default is empty.</para>
268 <term>virusfilter:block access on error = false</term>
270 <para>Controls whether or not access should be blocked on
271 a scanning error.</para>
272 <para>If this option is not set, the default is false.</para>
277 <term>virusfilter:scan error errno on open = EACCES</term>
279 <para>What errno to return on open if there is an error in
280 scanning the file and block access on error is true.
282 <para>If this option is not set, the default is EACCES.</para>
287 <term>virusfilter:scan error errno on close = 0</term>
289 <para>What errno to return on close if there is an error in
290 scanning the file and block access on error is true.
292 <para>If this option is not set, the default is 0.</para>
297 <term>virusfilter:cache entry limit = 100</term>
299 <para>The maximum number of entries in the scanning results
300 cache. Due to how Samba's memcache works, this is approximate.</para>
301 <para>If this option is not set, the default is 100.</para>
306 <term>virusfilter:cache time limit = 10</term>
308 <para>The maximum number of seconds that a scanning result
309 will stay in the results cache. -1 disables the limit.
310 0 disables caching.</para>
311 <para>If this option is not set, the default is 10.</para>
316 <term>virusfilter:quarantine directory mode = 0755</term>
318 <para>This is the octet mode for the quarantine directory and
319 its sub-directories as they are created.</para>
320 <para>If this option is not set, the default is 0755 or
321 S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH |
323 <para>Permissions must be such that all users can read and
324 search. I.E. don't mess with this unless you really know what
325 you are doing.</para>
330 <term>virusfilter:block suspected file = false</term>
332 <para>With this option on, suspected malware will be blocked as
333 well. Only the <emphasis>fsav</emphasis>scanner supports this
335 <para>If this option is not set, the default is false.</para>
345 <para>This module can scan other than default streams, if the
346 alternative datastreams are each backed as separate files, such as with
347 the vfs module streams_depot.</para>
349 <para>For proper operation the streams support module must be before
350 the virusfilter module in your vfs objects list (i.e. streams_depot
351 must be called before virusfilter module).</para>
353 <para>This module is intended for security in depth by providing
354 virus scanning capability on the server. It is not intended to be used
355 in lieu of proper client based security. Other modules for security may
356 exist and may be desirable for security in depth on the server.</para>
360 <title>AUTHOR</title>
362 <para>The original Samba software and related utilities
363 were created by Andrew Tridgell. Samba is now developed
364 by the Samba Team as an Open Source project similar
365 to the way the Linux kernel is developed.</para>