docs: Document DCEPRC binding string for rpcclient
[sfrench/samba-autobuild/.git] / docs-xml / manpages / vfs_virusfilter.8.xml
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">
4
5 <refmeta>
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>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>vfs_virusfilter</refname>
16         <refpurpose>On access virus scanner</refpurpose>
17 </refnamediv>
18
19 <refsynopsisdiv>
20         <cmdsynopsis>
21                 <command>vfs objects = virusfilter</command>
22         </cmdsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26         <title>DESCRIPTION</title>
27
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>
30
31         <para>This module is stackable.</para>
32
33 </refsect1>
34
35 <refsect1>
36         <title>OPTIONS</title>
37
38         <variablelist>
39
40                 <varlistentry>
41                 <term>virusfilter:scanner</term>
42                 <listitem>
43                 <para>The antivirus scan-engine.</para>
44                 <itemizedlist>
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>
51                 </itemizedlist>
52                 </listitem>
53                 </varlistentry>
54
55                 <varlistentry>
56                 <term>virusfilter:socket path = PATH</term>
57                 <listitem>
58                 <para>Path of local socket for the virus scanner.
59                 </para>
60                 <para>If this option is not set, the default path depends on the
61                 configured AV scanning engine.
62                 </para>
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>
69                 </listitem>
70                 </varlistentry>
71
72                 <varlistentry>
73                 <term>virusfilter:connect timeout = 30000</term>
74                 <listitem>
75                 <para>Controls how long to wait on connecting to the virus
76                 scanning process before timing out. Value is in milliseconds.
77                 </para>
78                 <para>If this option is not set, the default is 30000.</para>
79                 </listitem>
80                 </varlistentry>
81
82                 <varlistentry>
83                 <term>virusfilter:io timeout = 60000</term>
84                 <listitem>
85                 <para>Controls how long to wait on communications with the virus
86                 scanning process before timing out. Value is in milliseconds.
87                 </para>
88                 <para>If this option is not set, the default is 60000.</para>
89                 </listitem>
90                 </varlistentry>
91
92                 <varlistentry>
93                 <term>virusfilter:scan on open = yes</term>
94                 <listitem>
95                 <para>This option controls whether files are scanned on open.
96                 </para>
97                 <para>If this option is not set, the default is yes.</para>
98                 </listitem>
99                 </varlistentry>
100
101                 <varlistentry>
102                 <term>virusfilter:scan on close = no</term>
103                 <listitem>
104                 <para>This option controls whether files are scanned on close.
105                 </para>
106                 <para>If this option is not set, the default is no.</para>
107                 </listitem>
108                 </varlistentry>
109
110                 <varlistentry>
111                 <term>virusfilter:max file size = 100000000</term>
112                 <listitem>
113                 <para>This is the largest sized file, in bytes, which will be scanned.
114                 </para>
115                 <para>If this option is not set, the default is 100MB.</para>
116                 </listitem>
117                 </varlistentry>
118
119                 <varlistentry>
120                 <term>virusfilter:min file size = 10</term>
121                 <listitem>
122                 <para>This is the smallest sized file, in bytes, which will be scanned.
123                 </para>
124                 <para>If this option is not set, the default is 10.</para>
125                 </listitem>
126                 </varlistentry>
127
128                 <varlistentry>
129                 <term>virusfilter:infected file action = nothing</term>
130                 <listitem>
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>
134                 </listitem>
135                 </varlistentry>
136
137                 <varlistentry>
138                 <term>virusfilter:infected file errno on open = EACCES</term>
139                 <listitem>
140                 <para>What errno to return on open if the file is infected.
141                 </para>
142                 <para>If this option is not set, the default is EACCES.</para>
143                 </listitem>
144                 </varlistentry>
145
146                 <varlistentry>
147                 <term>virusfilter:infected file errno on close = 0</term>
148                 <listitem>
149                 <para>What errno to return on close if the file is infected.
150                 </para>
151                 <para>If this option is not set, the default is 0.</para>
152                 </listitem>
153                 </varlistentry>
154
155                 <varlistentry>
156                 <term>virusfilter:quarantine directory = PATH</term>
157                 <listitem>
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>
162                 </listitem>
163                 </varlistentry>
164
165                 <varlistentry>
166                 <term>virusfilter:quarantine prefix = virusfilter.</term>
167                 <listitem>
168                 <para>Prefix for quarantined files.</para>
169                 <para>If this option is not set, the default is "virusfilter.".</para>
170                 </listitem>
171                 </varlistentry>
172
173                 <varlistentry>
174                 <term>virusfilter:quarantine suffix = .infected</term>
175                 <listitem>
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>
179                 </listitem>
180                 </varlistentry>
181
182                 <varlistentry>
183                 <term>virusfilter:rename prefix = virusfilter.</term>
184                 <listitem>
185                 <para>Prefix for infected files.</para>
186                 <para>If this option is not set, the default is "virusfilter.".</para>
187                 </listitem>
188                 </varlistentry>
189
190                 <varlistentry>
191                 <term>virusfilter:rename suffix = .infected</term>
192                 <listitem>
193                 <para>Suffix for infected files.</para>
194                 <para>If this option is not set, the default is ".infected".</para>
195                 </listitem>
196                 </varlistentry>
197
198                 <varlistentry>
199                 <term>virusfilter:quarantine keep tree = yes</term>
200                 <listitem>
201                 <para>If keep tree is set, the directory structure relative
202                 to the share is maintained in the quarantine directory.
203                 </para>
204                 <para>If this option is not set, the default is yes.</para>
205                 </listitem>
206                 </varlistentry>
207
208                 <varlistentry>
209                 <term>virusfilter:quarantine keep name = yes</term>
210                 <listitem>
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>
215                 </listitem>
216                 </varlistentry>
217
218                 <varlistentry>
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>
220                 <listitem>
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>
223                 </listitem>
224                 </varlistentry>
225
226                 <varlistentry>
227                 <term>virusfilter:scan archive = true</term>
228                 <listitem>
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>
231                 </listitem>
232                 </varlistentry>
233
234                 <varlistentry>
235                 <term>virusfilter:max nested scan archive = 1</term>
236                 <listitem>
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>
239                 </listitem>
240                 </varlistentry>
241
242                 <varlistentry>
243                 <term>virusfilter:scan mime = true</term>
244                 <listitem>
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>
248                 </listitem>
249                 </varlistentry>
250
251                 <varlistentry>
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>
253                 <listitem>
254                 <para>External command to run on scan error.</para>
255                 <para>If this option is not set, the default is none.</para>
256                 </listitem>
257                 </varlistentry>
258
259                 <varlistentry>
260                 <term>virusfilter:exclude files = empty</term>
261                 <listitem>
262                 <para>Files to exclude from scanning.</para>
263                 <para>If this option is not set, the default is empty.</para>
264                 </listitem>
265                 </varlistentry>
266
267                 <varlistentry>
268                 <term>virusfilter:block access on error = false</term>
269                 <listitem>
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>
273                 </listitem>
274                 </varlistentry>
275
276                 <varlistentry>
277                 <term>virusfilter:scan error errno on open = EACCES</term>
278                 <listitem>
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.
281                 </para>
282                 <para>If this option is not set, the default is EACCES.</para>
283                 </listitem>
284                 </varlistentry>
285
286                 <varlistentry>
287                 <term>virusfilter:scan error errno on close = 0</term>
288                 <listitem>
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.
291                 </para>
292                 <para>If this option is not set, the default is 0.</para>
293                 </listitem>
294                 </varlistentry>
295
296                 <varlistentry>
297                 <term>virusfilter:cache entry limit = 100</term>
298                 <listitem>
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>
302                 </listitem>
303                 </varlistentry>
304
305                 <varlistentry>
306                 <term>virusfilter:cache time limit = 10</term>
307                 <listitem>
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>
312                 </listitem>
313                 </varlistentry>
314
315                 <varlistentry>
316                 <term>virusfilter:quarantine directory mode = 0755</term>
317                 <listitem>
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 |
322                 S_IXOTH.</para>
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>
326                 </listitem>
327                 </varlistentry>
328
329                 <varlistentry>
330                 <term>virusfilter:block suspected file = false</term>
331                 <listitem>
332                 <para>With this option on, suspected malware will be blocked as
333                 well. Only the <emphasis>fsav</emphasis>scanner supports this
334                 option.</para>
335                 <para>If this option is not set, the default is false.</para>
336                 </listitem>
337                 </varlistentry>
338
339         </variablelist>
340 </refsect1>
341
342 <refsect1>
343         <title>NOTES</title>
344
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>
348
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>
352
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>
357 </refsect1>
358
359 <refsect1>
360         <title>AUTHOR</title>
361
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>
366
367 </refsect1>
368
369 </refentry>