Debian Codegraph @

upstream/opensuse-tumbleweed/man8/vfs_virusfilter.8

raw
1 '\" t
2 .\" Title: vfs_virusfilter
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: System Administration tools
7 .\" Source: Samba 4.8
8 .\" Language: English
9 .\"
10 .TH "VFS_VIRUSFILTER" "8" "05/26/2026" "Samba 4\&.8" "System Administration tools"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 vfs_virusfilter \- On access virus scanner
32 .SH "SYNOPSIS"
33 .HP \w'\ 'u
34 vfs objects = virusfilter
35 .SH "DESCRIPTION"
36 .PP
37 This is a set of various Samba VFS modules to scan and filter virus files on Samba file services with an anti\-virus scanner\&.
38 .PP
39 This module is stackable\&.
40 .SH "OPTIONS"
41 .PP
42 virusfilter:scanner
43 .RS 4
44 The antivirus scan\-engine\&.
45 .RS
46 .sp
47 .RS 4
48 .ie n \{\
49 \h'-04'\(bu\h'+03'\c
50 .\}
51 .el \{\
52 .sp -1
53 .IP \(bu 2.3
54 .\}
55 \fIsophos\fR, the Sophos AV scanner
56 .RE
57 .sp
58 .RS 4
59 .ie n \{\
60 \h'-04'\(bu\h'+03'\c
61 .\}
62 .el \{\
63 .sp -1
64 .IP \(bu 2.3
65 .\}
66 \fIfsav\fR, the F\-Secure AV scanner
67 .RE
68 .sp
69 .RS 4
70 .ie n \{\
71 \h'-04'\(bu\h'+03'\c
72 .\}
73 .el \{\
74 .sp -1
75 .IP \(bu 2.3
76 .\}
77 \fIclamav\fR, the ClamAV scanner
78 .RE
79 .sp
80 .RS 4
81 .ie n \{\
82 \h'-04'\(bu\h'+03'\c
83 .\}
84 .el \{\
85 .sp -1
86 .IP \(bu 2.3
87 .\}
88 \fIdummy\fR, dummy scanner used in tests\&. Checks against the
89 \fIinfected files\fR
90 parameter and flags any name that matches as infected\&.
91 .RE
92 .sp
93 .RE
94 .RE
95 .PP
96 virusfilter:socket path = PATH
97 .RS 4
98 Path of local socket for the virus scanner\&.
99 .sp
100 If this option is not set, the default path depends on the configured AV scanning engine\&.
101 .sp
102 For the
103 \fIsophos\fR
104 backend the default is
105 \fI/var/run/savdi/sssp\&.sock\fR\&.
106 .sp
107 For the
108 \fIfsav\fR
109 backend the default is
110 \fI/tmp/\&.fsav\-0\fR\&.
111 .sp
112 For the
113 \fIclamav\fR
114 backend the default is
115 \fI/var/run/clamav/clamd\&.ctl\fR\&.
116 .RE
117 .PP
118 virusfilter:connect timeout = 30000
119 .RS 4
120 Controls how long to wait on connecting to the virus scanning process before timing out\&. Value is in milliseconds\&.
121 .sp
122 If this option is not set, the default is 30000\&.
123 .RE
124 .PP
125 virusfilter:io timeout = 60000
126 .RS 4
127 Controls how long to wait on communications with the virus scanning process before timing out\&. Value is in milliseconds\&.
128 .sp
129 If this option is not set, the default is 60000\&.
130 .RE
131 .PP
132 virusfilter:scan on open = yes
133 .RS 4
134 This option controls whether files are scanned on open\&.
135 .sp
136 If this option is not set, the default is yes\&.
137 .RE
138 .PP
139 virusfilter:scan on close = no
140 .RS 4
141 This option controls whether files are scanned on close\&.
142 .sp
143 If this option is not set, the default is no\&.
144 .RE
145 .PP
146 virusfilter:max file size = 100000000
147 .RS 4
148 This is the largest sized file, in bytes, which will be scanned\&.
149 .sp
150 If this option is not set, the default is 100MB\&.
151 .RE
152 .PP
153 virusfilter:min file size = 10
154 .RS 4
155 This is the smallest sized file, in bytes, which will be scanned\&.
156 .sp
157 If this option is not set, the default is 10\&.
158 .RE
159 .PP
160 virusfilter:infected file action = nothing
161 .RS 4
162 What to do with an infected file\&. The options are nothing, quarantine, rename, delete\&.
163 .sp
164 If this option is not set, the default is nothing\&.
165 .RE
166 .PP
167 virusfilter:infected file errno on open = EACCES
168 .RS 4
169 What errno to return on open if the file is infected\&.
170 .sp
171 If this option is not set, the default is EACCES\&.
172 .RE
173 .PP
174 virusfilter:infected file errno on close = 0
175 .RS 4
176 What errno to return on close if the file is infected\&.
177 .sp
178 If this option is not set, the default is 0\&.
179 .RE
180 .PP
181 virusfilter:quarantine directory = PATH
182 .RS 4
183 Where to move infected files\&. This path must be an absolute path\&.
184 .sp
185 If this option is not set, the default is "\&.quarantine" relative to the share path\&.
186 .RE
187 .PP
188 virusfilter:quarantine prefix = virusfilter\&.
189 .RS 4
190 Prefix for quarantined files\&.
191 .sp
192 If this option is not set, the default is "virusfilter\&."\&.
193 .RE
194 .PP
195 virusfilter:quarantine suffix = \&.infected
196 .RS 4
197 Suffix for quarantined files\&. This option is only used if keep name is true\&. Otherwise it is ignored\&.
198 .sp
199 If this option is not set, the default is "\&.infected"\&.
200 .RE
201 .PP
202 virusfilter:rename prefix = virusfilter\&.
203 .RS 4
204 Prefix for infected files\&.
205 .sp
206 If this option is not set, the default is "virusfilter\&."\&.
207 .RE
208 .PP
209 virusfilter:rename suffix = \&.infected
210 .RS 4
211 Suffix for infected files\&.
212 .sp
213 If this option is not set, the default is "\&.infected"\&.
214 .RE
215 .PP
216 virusfilter:quarantine keep tree = yes
217 .RS 4
218 If keep tree is set, the directory structure relative to the share is maintained in the quarantine directory\&.
219 .sp
220 If this option is not set, the default is yes\&.
221 .RE
222 .PP
223 virusfilter:quarantine keep name = yes
224 .RS 4
225 Should the file name be left unmodified other than adding a suffix and/or prefix and a random suffix name as defined in virusfilter:rename prefix and virusfilter:rename suffix\&.
226 .sp
227 If this option is not set, the default is yes\&.
228 .RE
229 .PP
230 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: "
231 .RS 4
232 External command to run on an infected file is found\&.
233 .sp
234 If this option is not set, the default is none\&.
235 .RE
236 .PP
237 virusfilter:scan archive = true
238 .RS 4
239 This defines whether or not to scan archives\&.
240 .sp
241 Sophos and F\-Secure support this and it defaults to false\&.
242 .RE
243 .PP
244 virusfilter:max nested scan archive = 1
245 .RS 4
246 This defines the maximum depth to search nested archives\&.
247 .sp
248 The Sophos and F\-Secure support this and it defaults to 1\&.
249 .RE
250 .PP
251 virusfilter:scan mime = true
252 .RS 4
253 This defines whether or not to scan mime files\&.
254 .sp
255 Only the
256 \fIfsav\fRscanner supports this option and defaults to false\&.
257 .RE
258 .PP
259 virusfilter:scan error command = @SAMBA_DATADIR@/bin/virusfilter\-notify \-\-mail\-to virusmaster@example\&.com \-\-from samba@example\&.com \-\-subject\-prefix "Samba: Scan Error: "
260 .RS 4
261 External command to run on scan error\&.
262 .sp
263 If this option is not set, the default is none\&.
264 .RE
265 .PP
266 virusfilter:exclude files = empty
267 .RS 4
268 Files to exclude from scanning\&.
269 .sp
270 If this option is not set, the default is empty\&.
271 .RE
272 .PP
273 virusfilter:infected files = empty
274 .RS 4
275 Files that virusfilter
276 \fIdummy\fR
277 flags as infected\&.
278 .sp
279 If this option is not set, the default is empty\&.
280 .RE
281 .PP
282 virusfilter:block access on error = false
283 .RS 4
284 Controls whether or not access should be blocked on a scanning error\&.
285 .sp
286 If this option is not set, the default is false\&.
287 .RE
288 .PP
289 virusfilter:scan error errno on open = EACCES
290 .RS 4
291 What errno to return on open if there is an error in scanning the file and block access on error is true\&.
292 .sp
293 If this option is not set, the default is EACCES\&.
294 .RE
295 .PP
296 virusfilter:scan error errno on close = 0
297 .RS 4
298 What errno to return on close if there is an error in scanning the file and block access on error is true\&.
299 .sp
300 If this option is not set, the default is 0\&.
301 .RE
302 .PP
303 virusfilter:cache entry limit = 100
304 .RS 4
305 The maximum number of entries in the scanning results cache\&. Due to how Samba\*(Aqs memcache works, this is approximate\&.
306 .sp
307 If this option is not set, the default is 100\&.
308 .RE
309 .PP
310 virusfilter:cache time limit = 10
311 .RS 4
312 The maximum number of seconds that a scanning result will stay in the results cache\&. \-1 disables the limit\&. 0 disables caching\&.
313 .sp
314 If this option is not set, the default is 10\&.
315 .RE
316 .PP
317 virusfilter:quarantine directory mode = 0755
318 .RS 4
319 This is the octet mode for the quarantine directory and its sub\-directories as they are created\&.
320 .sp
321 If this option is not set, the default is 0755 or S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH\&.
322 .sp
323 Permissions must be such that all users can read and search\&. I\&.E\&. don\*(Aqt mess with this unless you really know what you are doing\&.
324 .RE
325 .PP
326 virusfilter:block suspected file = false
327 .RS 4
328 With this option on, suspected malware will be blocked as well\&. Only the
329 \fIfsav\fRscanner supports this option\&.
330 .sp
331 If this option is not set, the default is false\&.
332 .RE
333 .SH "NOTES"
334 .PP
335 This module can scan other than default streams, if the alternative datastreams are each backed as separate files, such as with the vfs module streams_depot\&.
336 .PP
337 For proper operation the streams support module must be before the virusfilter module in your vfs objects list (i\&.e\&. streams_depot must be called before virusfilter module)\&.
338 .PP
339 This module is intended for security in depth by providing virus scanning capability on the server\&. It is not intended to be used in lieu of proper client based security\&. Other modules for security may exist and may be desirable for security in depth on the server\&.
340 .SH "AUTHOR"
341 .PP
342 The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.