table of contents
VFS_SCANNEDONLY(8) | System Administration tools | VFS_SCANNEDONLY(8) |
NAME¶
vfs_scannedonly - Ensures that only files that have been scanned for viruses are visible and accessible to the end user.
SYNOPSIS¶
vfs objects = scannedonly
DESCRIPTION¶
This VFS module is part of the samba(8) suite.
The vfs_scannedonly VFS module ensures that only files that have been scanned for viruses are visible and accessible to the end user. If non-scanned files are found an anti-virus scanning daemon is notified. The anti-virus scanning daemon is not part of the Samba suite.
Scannedonly comes in two parts: a samba vfs module and (one or more) daemons. The daemon scans files. If a certain file is clean, a second file is created with prefix .scanned:. The Samba module simply looks if such a .scanned: file exists, and is newer than the pertinent file. If this is the case, the file is shown to the user. If this is not the case, the file is not returned in a directory listing (configurable), and cannot be opened (configurable). The Samba vfs module will notify the daemon to scan this file.
So what happens for the user in the default configuration. The first time a directory is listed, it shows files as 'file is being scanned for viruses, but after the first time all files are shown. There is a utility scannedonly_prescan that can help you to prescan all directories. When new files are written the daemon is notified immediately after the file is complete.
If a virus is found by the daemon, a file with a warning message is created in the directory of the user, a warning is sent to the logs, and the file is renamed to have prefix .virus:. Files with the .virus: prefix are never shown to the user and all access is denied.
This module is stackable.
CONFIGURATION¶
vfs_scannedonly relies on a anti-virus scanning daemon that listens on the scannedonly socket (unix domain socket or UDP socket).
OPTIONS¶
scannedonly:domain_socket = True
scannedonly:socketname = /var/lib/scannedonly/scan
scannedonly:portnum = 2020
scannedonly:scanhost = localhost
scannedonly:show_special_files = True
scannedonly:rm_hidden_files_on_rmdir = True
scannedonly:hide_nonscanned_files = True
scannedonly:scanning_message = is being scanned for viruses
scannedonly:recheck_time_open = 50
scannedonly:recheck_tries_open = 100
scannedonly:recheck_time_readdir = 50
scannedonly:recheck_tries_readdir = 20
scannedonly:allow_nonscanned_files = False
EXAMPLES¶
Enable anti-virus scanning:
[homes] vfs objects = scannedonly scannedonly:hide_nonscanned_files = False
CAVEATS¶
This is not true on-access scanning. However, it is very fast for files that have been scanned already.
VERSION¶
This man page is correct for version 3.6.0 of the Samba suite.
AUTHOR¶
The original Samba software and related utilities were created by Andrew Tridgell. Scannedonly was developed for Samba by Olivier Sessink. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.
04/11/2016 | Samba 3.6 |