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_scannedonly.8">
6 <refentrytitle>vfs_scannedonly</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">4.1</refmiscinfo>
15 <refname>vfs_scannedonly</refname>
16 <refpurpose>Ensures that only files that have been scanned for viruses are
17 visible and accessible to the end user.</refpurpose>
22 <command>vfs objects = scannedonly</command>
27 <title>DESCRIPTION</title>
29 <para>This VFS module is part of the
30 <citerefentry><refentrytitle>samba</refentrytitle>
31 <manvolnum>8</manvolnum></citerefentry> suite.</para>
33 <para>The <command>vfs_scannedonly</command> VFS module ensures that
34 only files that have been scanned for viruses are visible and accessible
35 to the end user. If non-scanned files are found an anti-virus scanning
36 daemon is notified. The anti-virus scanning daemon is not part of the
40 <para>Scannedonly comes in two parts: a samba vfs module and (one or
41 more) daemons. The daemon scans files. If a certain file is clean,
42 a second file is created with prefix <filename>.scanned:</filename>.
43 The Samba module simply looks if such a <filename>.scanned:</filename>
44 file exists, and is newer than the pertinent file. If this is the case,
45 the file is shown to the user. If this is not the case, the file is not
46 returned in a directory listing (configurable), and cannot be opened
47 (configurable). The Samba vfs module will notify the daemon to scan
51 <para>So what happens for the user in the default configuration. The
52 first time a directory is listed, it shows files as 'file is being
53 scanned for viruses, but after the first time all files are shown.
54 There is a utility scannedonly_prescan that can help you to prescan
55 all directories. When new files are written the daemon is notified
56 immediately after the file is complete.
59 <para>If a virus is found by the daemon, a file with a warning message
60 is created in the directory of the user, a warning is sent to the logs,
61 and the file is renamed to have prefix <filename>.virus:</filename>.
62 Files with the <filename>.virus:</filename> prefix are never shown to
63 the user and all access is denied.
66 <para>This module is stackable.</para>
71 <title>CONFIGURATION</title>
73 <para><command>vfs_scannedonly</command> relies on a anti-virus scanning
74 daemon that listens on the scannedonly socket (unix domain socket or UDP
80 <title>OPTIONS</title>
84 <term>scannedonly:domain_socket = True </term>
86 <para>Whether to use a unix domain socket or not (false reverts
93 <term>scannedonly:socketname = /var/lib/scannedonly/scan</term>
95 <para>The location of the unix domain socket to connect to</para>
100 <term>scannedonly:portnum = 2020</term>
102 <para>The udp port number to connect to
106 <varlistentry><term>scannedonly:scanhost = localhost</term>
109 When using UDP the host that runs the scanning daemon (this host
110 needs access to the files!)
114 <varlistentry><term>scannedonly:show_special_files = True</term>
117 Whether sockets, devices and fifo's (all not scanned for
118 viruses) should be visible to the user
122 <varlistentry><term>scannedonly:rm_hidden_files_on_rmdir = True</term>
125 Whether files that are not visible (<filename>.scanned:</filename>
126 files, <filename>.failed:</filename> files and <filename>.virus:
127 </filename> files) should be deleted if the user tries to remove
128 the directory. If false, the user will get the "directory is not
133 <varlistentry><term>scannedonly:hide_nonscanned_files = True</term>
136 If false, all non-scanned files are visible in directory listings.
137 If such files are found in a directory listing the scanning daemon
138 is notified that scanning is required. Access to non-scanned files
139 is still denied (see scannedonly:allow_nonscanned_files).
143 <varlistentry><term>scannedonly:scanning_message = is being scanned for
147 If non-scanned files are hidden
148 (if scannedonly:hide_nonscanned_files = True), a fake 0 byte file
149 is shown. The filename is the original filename with the message
154 <varlistentry><term>scannedonly:recheck_time_open = 50</term>
157 If a non-scanned file is opened, the vfs module will wait
158 recheck_tries_open times for recheck_time_open milliseconds for
159 the scanning daemon to create a <filename>.scanned:</filename>
160 file. For small files that are scanned by the daemon within the
161 time (tries * time) the behavior will be just like on-access
166 <varlistentry><term>scannedonly:recheck_tries_open = 100</term>
169 See recheck_time_open.
173 <varlistentry><term>scannedonly:recheck_time_readdir = 50</term>
176 If a non-scanned file is in a directory listing the vfs module
177 notifies the daemon (once for all files that need scanning in
178 that directory), and waits recheck_tries_readdir times for
179 recheck_time_readdir milliseconds. Only used when
180 hide_nonscanned_files is false.
184 <varlistentry><term>scannedonly:recheck_tries_readdir = 20</term>
187 See recheck_time_readdir.
191 <varlistentry><term>scannedonly:allow_nonscanned_files = False</term>
194 Allow access to non-scanned files. The daemon is notified,
195 however, and special files such as <filename>.scanned:</filename>
196 files. <filename>.virus:</filename> files and
197 <filename>.failed:</filename> files are not listed.
206 <title>EXAMPLES</title>
208 <para>Enable anti-virus scanning:</para>
210 <smbconfsection name="[homes]"/>
211 <smbconfoption name="vfs objects">scannedonly</smbconfoption>
212 <smbconfoption name="scannedonly:hide_nonscanned_files">False</smbconfoption>
218 <title>CAVEATS</title>
220 <para>This is not true on-access scanning. However, it is very fast
221 for files that have been scanned already.
226 <title>VERSION</title>
228 <para>This man page is correct for version 4.0.0 of the Samba suite.
233 <title>AUTHOR</title>
235 <para>The original Samba software and related utilities
236 were created by Andrew Tridgell. Scannedonly was
237 developed for Samba by Olivier Sessink. Samba is now developed
238 by the Samba Team as an Open Source project similar
239 to the way the Linux kernel is developed.</para>