2013-12-04 17:03:06 -05:00
.TH "clamd.conf" "5" "December 4, 2013" "ClamAV @VERSION@" "Clam AntiVirus"
2004-09-26 01:28:55 +00:00
.SH "NAME"
2020-04-01 17:21:46 -07:00
.LP
2004-09-27 20:53:24 +00:00
\fB clamd.conf\fR \- Configuration file for Clam AntiVirus Daemon
2004-09-26 01:28:55 +00:00
.SH "DESCRIPTION"
2020-04-01 17:21:46 -07:00
.LP
2004-09-26 01:28:55 +00:00
clamd.conf configures the Clam AntiVirus daemon, clamd(8).
.SH "FILE FORMAT"
2007-02-12 18:38:32 +00:00
The file consists of comments and options with arguments. Each line which starts with a hash (\fB #\fR ) symbol is ignored by the parser. Options and arguments are case sensitive and of the form \fB Option Argument\fR . The arguments are of the following types:
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB BOOL\fR
Boolean value (yes/no or true/false or 1/0).
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB STRING\fR
String without blank characters.
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB SIZE\fR
2013-12-04 17:03:06 -05:00
Size in bytes. You can use 'M' or 'm' modifiers for megabytes and 'K' or 'k' for kilobytes. To specify the size in bytes just don't use modifiers.
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB NUMBER\fR
Unsigned integer.
.SH "DIRECTIVES"
2020-04-01 17:21:46 -07:00
.LP
2007-02-12 18:38:32 +00:00
When some option is not used (commented out or not included in the configuration file at all) clamd takes a default action.
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB Example\fR
If this option is set clamd will not run.
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB LogFile STRING\fR
2013-12-04 17:03:06 -05:00
Save all reports to a log file.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB LogFileUnlock BOOL\fR
2013-12-04 17:03:06 -05:00
By default the log file is locked for writing and only a single daemon process can write to it. This option disables the lock.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB LogFileMaxSize SIZE\fR
2013-12-04 17:03:06 -05:00
Maximum size of the log file.
.br
Value of 0 disables the limit.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: 1048576
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB LogTime BOOL\fR
Log time for each message.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB LogClean BOOL\fR
2013-12-04 17:03:06 -05:00
Log all clean files.
.br
Useful in debugging but drastically increases the log size.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB LogSyslog BOOL\fR
2013-12-04 17:03:06 -05:00
Use the system logger (can work together with LogFile).
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB LogFacility STRING\fR
2013-12-04 17:03:06 -05:00
Type of syslog messages
.br
Please refer to 'man syslog' for facility names.
2020-04-01 17:21:46 -07:00
.br
2004-09-27 20:53:24 +00:00
Default: LOG_LOCAL6
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB LogVerbose BOOL\fR
2004-09-26 01:28:55 +00:00
Enable verbose logging.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2013-12-04 17:03:06 -05:00
.TP
\fB LogRotate BOOL\fR
Rotate log file. Requires LogFileMaxSize option set prior to this option.
.br
Default: no
2020-04-01 17:21:46 -07:00
.TP
2010-07-06 19:46:55 +02:00
\fB ExtendedDetectionInfo BOOL\fR
2010-11-05 15:32:51 +01:00
Log additional information about the infected file, such as its size and hash, together with the virus name.
2020-04-01 17:21:46 -07:00
.br
2010-07-06 19:46:55 +02:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB PidFile STRING\fR
2004-09-27 20:53:24 +00:00
Save the process identifier of a listening daemon (main thread) to a specified file.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2020-04-01 17:21:46 -07:00
.TP
2005-01-26 16:50:10 +00:00
\fB TemporaryDirectory STRING\fR
2013-12-04 17:03:06 -05:00
This option allows you to change the default temporary directory.
2020-04-01 17:21:46 -07:00
.br
2005-01-26 16:50:10 +00:00
Default: system specific (usually /tmp or /var/tmp).
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB DatabaseDirectory STRING\fR
2013-12-04 17:03:06 -05:00
This option allows you to change the default database directory. If you enable it, please make sure it points to the same directory in both clamd and freshclam.
.br
Default: defined at configuration (/usr/local/share/clamav)
2020-04-01 17:21:46 -07:00
.TP
2010-03-19 17:42:25 +01:00
\fB OfficialDatabaseOnly BOOL\fR
Only load the official signatures published by the ClamAV project.
2020-04-01 17:21:46 -07:00
.br
2010-03-19 17:42:25 +01:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB LocalSocket STRING\fR
Path to a local (Unix) socket the daemon will listen on.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2010-02-04 22:19:28 +01:00
.TP
2010-03-11 15:10:56 +01:00
\fB LocalSocketGroup STRING\fR
2010-02-04 22:19:28 +01:00
Sets the group ownership on the unix socket.
.br
Default: the primary group of the user running clamd
.TP
2010-03-11 15:10:56 +01:00
\fB LocalSocketMode STRING\fR
2010-02-04 22:19:28 +01:00
Sets the permissions on the unix socket to the specified mode.
.br
Default: socket is world readable and writable
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB FixStaleSocket BOOL\fR
2004-09-26 01:28:55 +00:00
Remove stale socket after unclean shutdown.
2020-04-01 17:21:46 -07:00
.br
2007-10-05 23:23:43 +00:00
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB TCPSocket NUMBER\fR
TCP port number the daemon will listen on.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB TCPAddr STRING\fR
2013-12-04 17:03:06 -05:00
By default clamd binds to INADDR_ANY.
.br
2014-03-04 15:10:35 -05:00
This option allows you to restrict the TCP address and provide some degree of protection from the outside world. This option can be specified multiple times in order to listen on multiple IPs. IPv6 is now supported.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB MaxConnectionQueueLength NUMBER\fR
Maximum length the queue of pending connections may grow to.
2020-04-01 17:21:46 -07:00
.br
2010-12-20 16:36:10 +02:00
Default: 200
2013-12-04 17:03:06 -05:00
.TP
\fB StreamMaxLength SIZE\fR
Close the STREAM session when the data size limit is exceeded.
2013-12-04 17:25:50 -05:00
.br
2013-12-04 17:03:06 -05:00
The value should match your MTA's limit for the maximum attachment size.
2013-12-04 17:25:50 -05:00
.br
Default: 25M
2013-12-04 17:03:06 -05:00
.TP
\fB StreamMinPort NUMBER\fR
The STREAM command uses an FTP-like protocol.
2013-12-04 17:25:50 -05:00
.br
2013-12-04 17:03:06 -05:00
This option sets the lower boundary for the port range.
2013-12-04 17:25:50 -05:00
.br
2013-12-04 17:03:06 -05:00
Default: 1024
.TP
\fB StreamMaxPort NUMBER\fR
This option sets the upper boundary for the port range.
2013-12-04 17:25:50 -05:00
.br
2013-12-04 17:03:06 -05:00
Default: 2048
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB MaxThreads NUMBER\fR
2007-02-12 18:38:32 +00:00
Maximum number of threads running at the same time.
2020-04-01 17:21:46 -07:00
.br
2004-09-27 20:53:24 +00:00
Default: 10
2020-04-01 17:21:46 -07:00
.TP
2004-09-27 20:53:24 +00:00
\fB ReadTimeout NUMBER\fR
2013-12-04 17:03:06 -05:00
This option specifies the time (in seconds) after which clamd should
timeout if a client doesn't provide any data.
2020-04-01 17:21:46 -07:00
.br
2004-09-27 20:53:24 +00:00
Default: 120
2009-04-06 09:26:19 +00:00
.TP
\fB CommandReadTimeout NUMBER\fR
This option specifies the time (in seconds) after which clamd should
2018-12-07 16:57:20 -05:00
timeout if a client doesn't provide any initial command after connecting. The
default is set to 30 to avoid timeouts with TCP sockets when processing large
messages. If using a Unix socket, the value can be changed to 5.
2009-04-06 09:26:19 +00:00
Note: the timeout for subsequents commands, and/or data chunks is specified by
ReadTimeout.
.br
2018-12-07 16:57:20 -05:00
Default: 30
2009-04-06 09:26:19 +00:00
.TP
\fB SendBufTimeout NUMBER\fR
2010-03-24 18:24:12 +01:00
This option specifies how long to wait (in milliseconds) if the send buffer is full.
2009-04-06 09:26:19 +00:00
Keep this value low to prevent clamd hanging.
.br
Default: 500
.TP
\fB MaxQueue NUMBER\fR
Maximum number of queued items (including those being processed by MaxThreads threads).
It is recommended to have this value at least twice MaxThreads if possible.
.br
\fB WARNING: you shouldn't increase this too much to avoid running out of file descriptors,
the following condition should hold:
2009-04-06 10:26:15 +00:00
MaxThreads*MaxRecursion + MaxQueue - MaxThreads + 6 < RLIMIT_NOFILE.\fR
2009-04-06 09:26:19 +00:00
RLIMIT_NOFILE is the maximum number of open file descriptors (usually 1024), set
2010-04-04 22:29:19 +02:00
by \fB ulimit \- n\fR .
2009-04-06 09:26:19 +00:00
.br
Default: 100
2020-04-01 17:21:46 -07:00
.TP
2005-01-26 16:50:10 +00:00
\fB IdleTimeout NUMBER\fR
2013-12-04 17:03:06 -05:00
This option specifies how long (in seconds) the process should wait
for a new job.
2020-04-01 17:21:46 -07:00
.br
2005-01-26 16:50:10 +00:00
Default: 30
2008-07-18 16:31:02 +00:00
.TP
\fB ExcludePath REGEX\fR
Don't scan files and directories matching REGEX. This directive can be used multiple times.
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB MaxDirectoryRecursion NUMBER\fR
2007-02-12 18:38:32 +00:00
Maximum depth directories are scanned at.
2020-04-01 17:21:46 -07:00
.br
2004-09-27 20:53:24 +00:00
Default: 15
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB FollowDirectorySymlinks BOOL\fR
2004-09-27 20:53:24 +00:00
Follow directory symlinks.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2009-08-05 16:27:48 +02:00
\fB CrossFilesystems BOOL\fR
Scan files and directories on other filesystems.
2020-04-01 17:21:46 -07:00
.br
2009-08-05 16:27:48 +02:00
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB FollowFileSymlinks BOOL\fR
2004-09-26 01:28:55 +00:00
Follow regular file symlinks.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2004-09-26 01:28:55 +00:00
\fB SelfCheck NUMBER\fR
2013-12-04 17:03:06 -05:00
This option specifies the time intervals (in seconds) in which clamd
should perform a database check.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: 600
2020-04-01 17:21:46 -07:00
.TP
2020-06-09 13:54:29 -04:00
\fB ConcurrentDatabaseReload BOOL\fR
Enable non-blocking (multi-threaded/concurrent) database reloads. This feature will temporarily load a second scanning engine while scanning continues using the first engine. Once loaded, the new engine takes over. The old engine is removed as soon as all scans using the old engine have completed. This feature requires more RAM, so this option is provided in case users are willing to block scans during reload in exchange for lower RAM requirements.
.br
Default: yes
.TP
2004-09-26 01:28:55 +00:00
\fB VirusEvent COMMAND\fR
2013-12-04 17:03:06 -05:00
Execute a command when a virus is found. In the command string %v will be
2020-11-26 13:37:14 +01:00
replaced with the virus name and %f will be replaced with the file name.
Additionally, two environment variables will be defined: $CLAM_VIRUSEVENT_FILENAME
and $CLAM_VIRUSEVENT_VIRUSNAME.
2004-09-26 01:28:55 +00:00
\fR
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB ExitOnOOM BOOL\fR
2005-06-18 23:00:56 +00:00
Stop daemon when libclamav reports out of memory condition.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2013-12-04 17:03:06 -05:00
\fB AllowAllMatchScan BOOL\fR
Permit use of the ALLMATCHSCAN command.
.br
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB Foreground BOOL\fR
2004-09-27 20:53:24 +00:00
Don't fork into background.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB Debug BOOL\fR
2004-09-27 20:53:24 +00:00
Enable debug messages from libclamav.
2013-12-04 17:03:06 -05:00
.br
Default: no
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB LeaveTemporaryFiles BOOL\fR
2013-12-04 17:03:06 -05:00
Do not remove temporary files (for debugging purpose).
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2013-12-04 17:03:06 -05:00
.TP
2021-10-03 21:51:15 -07:00
\fB GenerateMetadataJson BOOL\fR
Record metadata about the file being scanned.
Scan metadata is useful for file analysis purposes and for debugging scan behavior.
The JSON metadata will be printed after the scan is complete if Debug is enabled.
A metadata.json file will be written to the scan temp directory if LeaveTemporaryFiles is enabled.
.br
Default: no
.TP
2013-12-04 17:03:06 -05:00
\fB User STRING\fR
Run the daemon as a specified user (the process must be started by root).
.br
Default: disabled
.TP
2010-03-19 17:42:25 +01:00
\fB Bytecode BOOL\fR
With this option enabled ClamAV will load bytecode from the database. It is highly recommended you keep this option turned on, otherwise you may miss detections for many new viruses.
.br
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2010-03-19 17:42:25 +01:00
\fB BytecodeSecurity STRING\fR
2020-04-01 17:21:46 -07:00
Set bytecode security level.
2013-12-04 17:03:06 -05:00
.RS
.PD 0
.HP 4
Possible values:
.br
2020-04-01 17:21:46 -07:00
\fB TrustSigned\fR \- trust bytecode loaded from signed .c[lv]d files and insert runtime safety checks for bytecode loaded from other sources,
2013-12-04 17:03:06 -05:00
.br
2020-04-01 17:21:46 -07:00
\fB Paranoid\fR \- don't trust any bytecode, insert runtime checks for all.
2013-12-04 17:03:06 -05:00
.RE
.RS
Recommended: \fB TrustSigned\fR , because bytecode in .cvd files already has these checks.
2020-04-01 17:21:46 -07:00
.br
2010-03-19 17:42:25 +01:00
Default: TrustSigned
2013-12-04 17:03:06 -05:00
.PD 1
.RE
2020-04-01 17:21:46 -07:00
.TP
2013-12-04 17:03:06 -05:00
\fB BytecodeTimeout NUMBER\fR
Set bytecode timeout in milliseconds.
.br
Default: 5000
2020-04-01 17:21:46 -07:00
.TP
2011-02-17 19:17:35 +01:00
\fB BytecodeUnsigned BOOL\fR
Allow loading bytecode from outside digitally signed .c[lv]d files.
2020-07-06 13:03:35 -07:00
**Caution**: You should NEVER run bytecode signatures from untrusted sources.
Doing so may result in arbitrary code execution.
2011-02-17 19:17:35 +01:00
.br
Default: no
2013-12-04 17:03:06 -05:00
.TP
\fB BytecodeMode STRING\fR
Set bytecode execution mode.
.RS
.PD 0
.HP 4
Possible values:
2010-03-24 18:24:12 +01:00
.br
2013-12-04 17:03:06 -05:00
\fB Auto\fR \- automatically choose JIT if possible, fallback to interpreter
.br
\fB ForceJIT\fR \- always choose JIT, fail if not possible
.br
2014-12-12 17:10:10 -05:00
\fB ForceInterpreter\fR \- always choose interpreter
2013-12-04 17:03:06 -05:00
.br
\fB Test\fR \- run with both JIT and interpreter and compare results. Make all failures fatal.
.RE
.RS
Default: Auto
.PD 1
.RE
2020-04-01 17:21:46 -07:00
.TP
2010-03-19 17:42:25 +01:00
\fB DetectPUA BOOL\fR
2007-08-13 18:10:35 +00:00
Detect Possibly Unwanted Applications.
2020-04-01 17:21:46 -07:00
.br
2007-08-13 18:10:35 +00:00
Default: No
2008-08-01 19:01:22 +00:00
.TP
\fB ExcludePUA CATEGORY\fR
2021-07-17 16:15:33 -07:00
Exclude a specific PUA category. This directive can be used multiple times. See https://docs.clamav.net/faq/faq-pua.html for the complete list of PUA categories.
2008-08-01 19:01:22 +00:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2008-08-01 19:01:22 +00:00
.TP
\fB IncludePUA CATEGORY\fR
2021-07-17 16:15:33 -07:00
Only include a specific PUA category. This directive can be used multiple times. See https://docs.clamav.net/faq/faq-pua.html for the complete list of PUA categories.
2008-08-01 19:01:22 +00:00
.br
2013-12-04 17:03:06 -05:00
Default: disabled
2020-04-01 17:21:46 -07:00
.TP
2018-10-10 06:02:28 -07:00
\fB HeuristicAlerts BOOL\fR
2005-12-12 18:44:37 +00:00
In some cases (eg. complex malware, exploits in graphic files, and others), ClamAV uses special algorithms to provide accurate detection. This option controls the algorithmic detection.
2020-04-01 17:21:46 -07:00
.br
2005-12-12 18:44:37 +00:00
Default: yes
2018-10-10 06:02:28 -07:00
.TP
\fB HeuristicScanPrecedence BOOL\fR
Allow heuristic match to take precedence. When enabled, if a heuristic scan (such as phishingScan) detects a possible virus/phishing it will stop scanning immediately. Recommended, saves CPU scan-time. When disabled, virus/phishing detected by heuristic scans will be reported only at the end of a scan. If an archive contains both a heuristically detected virus/phishing, and a real malware, the real malware will be reported. Keep this disabled if you intend to handle "*.Heuristics.*" viruses differently from "real" malware. If a non-heuristically-detected virus (signature-based) is found first, the scan is interrupted immediately, regardless of this config option.
.br
Default: no
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB ScanPE BOOL\fR
2020-04-01 17:21:46 -07:00
PE stands for Portable Executable \- it's an executable file format used in all 32 and 64\- bit versions of Windows operating systems. This option allows ClamAV to perform a deeper analysis of executable files and it's also required for decompression of popular executable packers such as UPX.
2013-12-04 17:03:06 -05:00
.br
If you turn off this option, the original files will still be scanned, but without additional processing.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB ScanELF BOOL\fR
2020-04-01 17:21:46 -07:00
Executable and Linking Format is a standard format for UN*X executables. This option allows you to control the scanning of ELF files.
2013-12-04 17:03:06 -05:00
.br
If you turn off this option, the original files will still be scanned, but without additional processing.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB ScanMail BOOL\fR
2020-04-01 17:21:46 -07:00
Enable scanning of mail files.
2013-12-04 17:03:06 -05:00
.br
If you turn off this option, the original files will still be scanned, but without parsing individual messages/attachments.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: yes
2006-12-12 14:00:13 +00:00
.TP
2008-07-31 10:51:46 +00:00
\fB ScanPartialMessages BOOL\fR
Scan RFC1341 messages split over many emails. You will need to periodically clean up $TemporaryDirectory/clamav-partial directory. \fB WARNING: This option may open your system to a DoS attack. Never use it on loaded servers.\fR
.br
Default: no
.TP
2007-02-12 18:38:32 +00:00
\fB PhishingSignatures BOOL\fR
2018-10-10 06:02:28 -07:00
Enable email signature-based phishing detection.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: yes
.TP
\fB PhishingScanURLs BOOL\fR
2021-10-29 14:11:48 -07:00
Enable URL signature-based phishing detection (Heuristics.Phishing.Email.*)
2006-09-14 19:38:17 +00:00
.br
2007-02-12 18:38:32 +00:00
Default: yes
.TP
2008-04-18 17:14:20 +00:00
\fB StructuredDataDetection BOOL\fR
Enable the DLP module.
2020-04-01 17:21:46 -07:00
.br
2008-04-18 17:14:20 +00:00
Default: no
.TP
\fB StructuredMinCreditCardCount NUMBER\fR
This option sets the lowest number of Credit Card numbers found in a file to generate a detect.
2020-04-01 17:21:46 -07:00
.br
2008-08-29 10:32:33 +00:00
Default: 3
2008-04-18 17:14:20 +00:00
.TP
2016-04-21 12:13:57 -04:00
\fB StructuredCCOnly BOOL\fR
With this option enabled the DLP module will search for valid Credit Card\nn umbers only. Debit and Private Label cards will not be searched.
2020-06-09 13:54:29 -04:00
.br
2016-04-21 12:13:57 -04:00
Default: No
.TP
2008-04-18 17:14:20 +00:00
\fB StructuredMinSSNCount NUMBER\fR
This option sets the lowest number of Social Security Numbers found in a file to generate a detect.
2020-04-01 17:21:46 -07:00
.br
2008-08-29 10:32:33 +00:00
Default: 3
2008-04-18 17:14:20 +00:00
.TP
\fB StructuredSSNFormatNormal BOOL\fR
With this option enabled the DLP module will search for valid SSNs formatted as xxx-yy-zzzz.
2020-04-01 17:21:46 -07:00
.br
2008-04-18 17:14:20 +00:00
Default: Yes
.TP
\fB StructuredSSNFormatStripped BOOL\fR
With this option enabled the DLP module will search for valid SSNs formatted as xxxyyzzzz.
2020-04-01 17:21:46 -07:00
.br
2008-08-29 23:33:12 +00:00
Default: No
2008-04-18 17:14:20 +00:00
.TP
2013-12-04 17:03:06 -05:00
\fB ScanHTML BOOL\fR
Perform HTML/JavaScript/ScriptEncoder normalisation and decryption.
.br
If you turn off this option, the original files will still be scanned, but without additional processing.
.br
Default: yes
.TP
\fB ScanOLE2 BOOL\fR
2020-04-01 17:21:46 -07:00
This option enables scanning of OLE2 files, such as Microsoft Office documents and .msi files.
2013-12-04 17:03:06 -05:00
.br
If you turn off this option, the original files will still be scanned, but without additional processing.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2013-12-04 17:03:06 -05:00
\fB ScanPDF BOOL\fR
This option enables scanning within PDF files.
.br
If you turn off this option, the original files will still be scanned, but without additional processing.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2013-12-04 17:03:06 -05:00
\fB ScanSWF BOOL\fR
This option enables scanning within SWF files.
.br
If you turn off this option, the original files will still be scanned, but without decoding and additional processing.
2020-04-01 17:21:46 -07:00
.br
2013-12-04 17:03:06 -05:00
Default: yes
.TP
2016-02-02 14:23:13 -05:00
\fB ScanXMLDOCS BOOL\fR
This option enables scanning xml-based document files supported by libclamav.
.br
If you turn off this option, the original files will still be scanned, but without additional processing.
.br
Default: yes
.TP
\fB ScanHWP3 BOOL\fR
This option enables scanning HWP3 files.
.br
If you turn off this option, the original files will still be scanned, but without additional processing.
.br
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2007-02-12 18:38:32 +00:00
\fB ScanArchive BOOL\fR
2013-12-04 17:03:06 -05:00
Scan within archives and compressed files.
.br
If you turn off this option, the original files will still be scanned, but without unpacking and additional processing.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: yes
2020-04-01 17:21:46 -07:00
.TP
2018-10-10 06:02:28 -07:00
\fB AlertBrokenExecutables BOOL\fR
Alert on broken executable files (PE & ELF).
2020-04-01 17:21:46 -07:00
.br
2018-10-10 06:02:28 -07:00
Default: no
.TP
GIF, PNG bugfixes; Add AlertBrokenMedia option
Added a new scan option to alert on broken media (graphics) file
formats. This feature mitigates the risk of malformed media files
intended to exploit vulnerabilities in other software. At present
media validation exists for JPEG, TIFF, PNG, and GIF files.
To enable this feature, set `AlertBrokenMedia yes` in clamd.conf, or
use the `--alert-broken-media` option when using `clamscan`.
These options are disabled by default for now.
Application developers may enable this scan option by enabling
`CL_SCAN_HEURISTIC_BROKEN_MEDIA` for the `heuristic` scan option bit
field.
Fixed PNG parser logic bugs that caused an excess of parsing errors
and fixed a stack exhaustion issue affecting some systems when
scanning PNG files. PNG file type detection was disabled via
signature database update for 0.103.0 to mitigate effects from these
bugs.
Fixed an issue where PNG and GIF files no longer work with Target:5
(graphics) signatures if detected as CL_TYPE_PNG/GIF rather than as
CL_TYPE_GRAPHICS. Target types now support up to 10 possible file
types to make way for additional graphics types in future releases.
Scanning JPEG, TIFF, PNG, and GIF files will no longer return "parse"
errors when file format validation fails. Instead, the scan will alert
with the "Heuristics.Broken.Media" signature prefix and a descriptive
suffix to indicate the issue, provided that the "alert broken media"
feature is enabled.
GIF format validation will no longer fail if the GIF image is missing
the trailer byte, as this appears to be a relatively common issue in
otherwise functional GIF files.
Added a TIFF dynamic configuration (DCONF) option, which was missing.
This will allow us to disable TIFF format validation via signature
database update in the event that it proves to be problematic.
This feature already exists for many other file types.
Added CL_TYPE_JPEG and CL_TYPE_TIFF types.
2020-11-04 15:49:43 -08:00
\fB AlertBrokenMedia BOOL\fR
Alert on broken graphics files (JPEG, TIFF, PNG, GIF).
.br
Default: no
.TP
2018-10-10 06:02:28 -07:00
\fB AlertEncrypted BOOL\fR
Alert on encrypted archives and documents (encrypted .zip, .7zip, .rar, .pdf).
.br
Default: no
.TP
\fB AlertEncryptedArchive BOOL\fR
Alert on encrypted archives (encrypted .zip, .7zip, .rar).
.br
Default: no
.TP
\fB AlertEncryptedDoc BOOL\fR
Alert on encrypted documents (encrypted .pdf).
.br
Default: no
2020-04-01 17:21:46 -07:00
.TP
2018-10-10 06:02:28 -07:00
\fB AlertOLE2Macros BOOL\fR
Alert on OLE2 files containing VBA macros (Heuristics.OLE2.ContainsMacros).
2020-04-01 17:21:46 -07:00
.br
2018-10-10 06:02:28 -07:00
Default: no
.TP
\fB AlertExceedsMax BOOL\fR
2021-10-29 14:11:48 -07:00
When AlertExceedsMax is set, files exceeding the MaxFileSize, MaxScanSize, or MaxRecursion limit will be flagged with the virus name starting with "Heuristics.Limits.Exceeded".
2020-04-01 17:21:46 -07:00
.br
2018-10-10 06:02:28 -07:00
Default: no
.TP
\fB AlertPhishingSSLMismatch BOOL\fR
Alert on emails containing SSL mismatches in URLs (might lead to false positives!).
.br
Default: no
.TP
\fB AlertPhishingCloak BOOL\fR
Alert on emails containing cloaked URLs (might lead to some false positives).
.br
Default: no
2013-12-04 17:03:06 -05:00
.TP
2018-10-10 06:02:28 -07:00
\fB AlertPartitionIntersection BOOL\fR
Alert on raw DMG image files containing partition intersections.
2013-12-04 17:03:06 -05:00
.br
Default: no
.TP
\fB ForceToDisk\fR
This option causes memory or nested map scans to dump the content to disk.
.br
If you turn on this option, more data is written to disk and is available when the leave-temps option is enabled at the cost of more disk writes.
2020-04-01 17:21:46 -07:00
.br
2007-02-12 18:38:32 +00:00
Default: no
2020-04-01 17:21:46 -07:00
.TP
\fB MaxScanTime SIZE\fR
This option sets the maximum amount of time a scan may take to complete. The value is in milliseconds. The value of 0 disables the limit. \fB WARNING: disabling this limit or setting it too high may result allow scanning of certain files to lock up the scanning process/threads resulting in a Denial of Service.\fR
.br
2021-11-11 01:12:59 +01:00
Default: 120000
2020-04-01 17:21:46 -07:00
.TP
2008-02-15 12:16:11 +00:00
\fB MaxScanSize SIZE\fR
2014-02-05 10:58:16 -05:00
Sets the maximum amount of data to be scanned for each input file. Archives and other containers are recursively extracted and scanned up to this value. The size of an archive plus the sum of the sizes of all files within archive count toward the scan size. For example, a 1M uncompressed archive containing a single 1M inner file counts as 2M toward the max scan size. \fB Warning: disabling this limit or setting it too high may result in severe damage to the system.\fR
2020-04-01 17:21:46 -07:00
.br
2008-02-15 12:16:11 +00:00
Default: 100M
2020-04-01 17:21:46 -07:00
.TP
2008-02-15 12:16:11 +00:00
\fB MaxFileSize SIZE\fR
2021-03-31 12:16:41 -07:00
Files larger than this limit won't be scanned. Affects the input file itself as well as files contained inside it (when the input file is an archive, a document or some other kind of container). \fB Warning: disabling this limit or setting it too high may result in severe damage to the system. Technical design limitations prevent ClamAV from scanning files greater than 2 GB at this time.\fR
2020-04-01 17:21:46 -07:00
.br
2008-02-15 12:16:11 +00:00
Default: 25M
2020-04-01 17:21:46 -07:00
.TP
2008-02-15 12:16:11 +00:00
\fB MaxRecursion NUMBER\fR
2010-04-27 16:35:38 +02:00
Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR file, all files within it will also be scanned. This options specifies how deeply the process should be continued. \fB Warning: setting this limit too high may result in severe damage to the system.\fR
2020-04-01 17:21:46 -07:00
.br
libclamav: Fix scan recursion tracking
Scan recursion is the process of identifying files embedded in other
files and then scanning them, recursively.
Internally this process is more complex than it may sound because a file
may have multiple layers of types before finding a new "file".
At present we treat the recursion count in the scanning context as an
index into both our fmap list AND our container list. These two lists
are conceptually a part of the same thing and should be unified.
But what's concerning is that the "recursion level" isn't actually
incremented or decremented at the same time that we add a layer to the
fmap or container lists but instead is more touchy-feely, increasing
when we find a new "file".
To account for this shadiness, the size of the fmap and container lists
has always been a little longer than our "max scan recursion" limit so
we don't accidentally overflow the fmap or container arrays (!).
I've implemented a single recursion-stack as an array, similar to before,
which includes a pointer to each fmap at each layer, along with the size
and type. Push and pop functions add and remove layers whenever a new
fmap is added. A boolean argument when pushing indicates if the new layer
represents a new buffer or new file (descriptor). A new buffer will reset
the "nested fmap level" (described below).
This commit also provides a solution for an issue where we detect
embedded files more than once during scan recursion.
For illustration, imagine a tarball named foo.tar.gz with this structure:
| description | type | rec level | nested fmap level |
| ------------------------- | ----- | --------- | ----------------- |
| foo.tar.gz | GZ | 0 | 0 |
| └── foo.tar | TAR | 1 | 0 |
| ├── bar.zip | ZIP | 2 | 1 |
| │  └── hola.txt | ASCII | 3 | 0 |
| └── baz.exe | PE | 2 | 1 |
But suppose baz.exe embeds a ZIP archive and a 7Z archive, like this:
| description | type | rec level | nested fmap level |
| ------------------------- | ----- | --------- | ----------------- |
| baz.exe | PE | 0 | 0 |
| ├── sfx.zip | ZIP | 1 | 1 |
| │  └── hello.txt | ASCII | 2 | 0 |
| └── sfx.7z | 7Z | 1 | 1 |
|   └── world.txt | ASCII | 2 | 0 |
(A) If we scan for embedded files at any layer, we may detect:
| description | type | rec level | nested fmap level |
| ------------------------- | ----- | --------- | ----------------- |
| foo.tar.gz | GZ | 0 | 0 |
| ├── foo.tar | TAR | 1 | 0 |
| │ ├── bar.zip | ZIP | 2 | 1 |
| │ │  └── hola.txt | ASCII | 3 | 0 |
| │ ├── baz.exe | PE | 2 | 1 |
| │ │ ├── sfx.zip | ZIP | 3 | 1 |
| │ │ │  └── hello.txt | ASCII | 4 | 0 |
| │ │ └── sfx.7z | 7Z | 3 | 1 |
| │ │   └── world.txt | ASCII | 4 | 0 |
| │ ├── sfx.zip | ZIP | 2 | 1 |
| │ │  └── hello.txt | ASCII | 3 | 0 |
| │ └── sfx.7z | 7Z | 2 | 1 |
| │  └── world.txt | ASCII | 3 | 0 |
| ├── sfx.zip | ZIP | 1 | 1 |
| └── sfx.7z | 7Z | 1 | 1 |
(A) is bad because it scans content more than once.
Note that for the GZ layer, it may detect the ZIP and 7Z if the
signature hits on the compressed data, which it might, though
extracting the ZIP and 7Z will likely fail.
The reason the above doesn't happen now is that we restrict embedded
type scans for a bunch of archive formats to include GZ and TAR.
(B) If we scan for embedded files at the foo.tar layer, we may detect:
| description | type | rec level | nested fmap level |
| ------------------------- | ----- | --------- | ----------------- |
| foo.tar.gz | GZ | 0 | 0 |
| └── foo.tar | TAR | 1 | 0 |
| ├── bar.zip | ZIP | 2 | 1 |
| │  └── hola.txt | ASCII | 3 | 0 |
| ├── baz.exe | PE | 2 | 1 |
| ├── sfx.zip | ZIP | 2 | 1 |
| │  └── hello.txt | ASCII | 3 | 0 |
| └── sfx.7z | 7Z | 2 | 1 |
|   └── world.txt | ASCII | 3 | 0 |
(B) is almost right. But we can achieve it easily enough only scanning for
embedded content in the current fmap when the "nested fmap level" is 0.
The upside is that it should safely detect all embedded content, even if
it may think the sfz.zip and sfx.7z are in foo.tar instead of in baz.exe.
The biggest risk I can think of affects ZIPs. SFXZIP detection
is identical to ZIP detection, which is why we don't allow SFXZIP to be
detected if insize of a ZIP. If we only allow embedded type scanning at
fmap-layer 0 in each buffer, this will fail to detect the embedded ZIP
if the bar.exe was not compressed in foo.zip and if non-compressed files
extracted from ZIPs aren't extracted as new buffers:
| description | type | rec level | nested fmap level |
| ------------------------- | ----- | --------- | ----------------- |
| foo.zip | ZIP | 0 | 0 |
| └── bar.exe | PE | 1 | 1 |
| └── sfx.zip | ZIP | 2 | 2 |
Provided that we ensure all files extracted from zips are scanned in
new buffers, option (B) should be safe.
(C) If we scan for embedded files at the baz.exe layer, we may detect:
| description | type | rec level | nested fmap level |
| ------------------------- | ----- | --------- | ----------------- |
| foo.tar.gz | GZ | 0 | 0 |
| └── foo.tar | TAR | 1 | 0 |
| ├── bar.zip | ZIP | 2 | 1 |
| │  └── hola.txt | ASCII | 3 | 0 |
| └── baz.exe | PE | 2 | 1 |
| ├── sfx.zip | ZIP | 3 | 1 |
| │  └── hello.txt | ASCII | 4 | 0 |
| └── sfx.7z | 7Z | 3 | 1 |
|   └── world.txt | ASCII | 4 | 0 |
(C) is right. But it's harder to achieve. For this example we can get it by
restricting 7ZSFX and ZIPSFX detection only when scanning an executable.
But that may mean losing detection of archives embedded elsewhere.
And we'd have to identify allowable container types for each possible
embedded type, which would be very difficult.
So this commit aims to solve the issue the (B)-way.
Note that in all situations, we still have to scan with file typing
enabled to determine if we need to reassign the current file type, such
as re-identifying a Bzip2 archive as a DMG that happens to be Bzip2-
compressed. Detection of DMG and a handful of other types rely on
finding data partway through or near the ned of a file before
reassigning the entire file as the new type.
Other fixes and considerations in this commit:
- The utf16 HTML parser has weak error handling, particularly with respect
to creating a nested fmap for scanning the ascii decoded file.
This commit cleans up the error handling and wraps the nested scan with
the recursion-stack push()/pop() for correct recursion tracking.
Before this commit, each container layer had a flag to indicate if the
container layer is valid.
We need something similar so that the cli_recursion_stack_get_*()
functions ignore normalized layers. Details...
Imagine an LDB signature for HTML content that specifies a ZIP
container. If the signature actually alerts on the normalized HTML and
you don't ignore normalized layers for the container check, it will
appear as though the alert is in an HTML container rather than a ZIP
container.
This commit accomplishes this with a boolean you set in the scan context
before scanning a new layer. Then when the new fmap is created, it will
use that flag to set similar flag for the layer. The context flag is
reset those that anything after this doesn't have that flag.
The flag allows the new recursion_stack_get() function to ignore
normalized layers when iterating the stack to return a layer at a
requested index, negative or positive.
Scanning normalized extracted/normalized javascript and VBA should also
use the 'layer is normalized' flag.
- This commit also fixes Heuristic.Broken.Executable alert for ELF files
to make sure that:
A) these only alert if cli_append_virus() returns CL_VIRUS (aka it
respects the FP check).
B) all broken-executable alerts for ELF only happen if the
SCAN_HEURISTIC_BROKEN option is enabled.
- This commit also cleans up the error handling in cli_magic_scan_dir().
This was needed so we could correctly apply the layer-is-normalized-flag
to all VBA macros extracted to a directory when scanning the directory.
- Also fix an issue where exceeding scan maximums wouldn't cause embedded
file detection scans to abort. Granted we don't actually want to abort
if max filesize or max recursion depth are exceeded... only if max
scansize, max files, and max scantime are exceeded.
Add 'abort_scan' flag to scan context, to protect against depending on
correct error propagation for fatal conditions. Instead, setting this
flag in the scan context should guarantee that a fatal condition deep in
scan recursion isn't lost which result in more stuff being scanned
instead of aborting. This shouldn't be necessary, but some status codes
like CL_ETIMEOUT never used to be fatal and it's easier to do this than
to verify every parser only returns CL_ETIMEOUT and other "fatal
status codes" in fatal conditions.
- Remove duplicate is_tar() prototype from filestypes.c and include
is_tar.h instead.
- Presently we create the fmap hash when creating the fmap.
This wastes a bit of CPU if the hash is never needed.
Now that we're creating fmap's for all embedded files discovered with
file type recognition scans, this is a much more frequent occurence and
really slows things down.
This commit fixes the issue by only creating fmap hashes as needed.
This should not only resolve the perfomance impact of creating fmap's
for all embedded files, but also should improve performance in general.
- Add allmatch check to the zip parser after the central-header meta
match. That way we don't multiple alerts with the same match except in
allmatch mode. Clean up error handling in the zip parser a tiny bit.
- Fixes to ensure that the scan limits such as scansize, filesize,
recursion depth, # of embedded files, and scantime are always reported
if AlertExceedsMax (--alert-exceeds-max) is enabled.
- Fixed an issue where non-fatal alerts for exceeding scan maximums may
mask signature matches later on. I changed it so these alerts use the
"possibly unwanted" alert-type and thus only alert if no other alerts
were found or if all-match or heuristic-precedence are enabled.
- Added the "Heuristics.Limits.Exceeded.*" events to the JSON metadata
when the --gen-json feature is enabled. These will show up once under
"ParseErrors" the first time a limit is exceeded. In the present
implementation, only one limits-exceeded events will be added, so as to
prevent a malicious or malformed sample from filling the JSON buffer
with millions of events and using a tonne of RAM.
2021-09-11 14:15:21 -07:00
Default: 17
2020-04-01 17:21:46 -07:00
.TP
2008-02-15 12:16:11 +00:00
\fB MaxFiles NUMBER\fR
Number of files to be scanned within an archive, a document, or any other kind of container. \fB Warning: disabling this limit or setting it too high may result in severe damage to the system.\fR
2020-04-01 17:21:46 -07:00
.br
2008-02-15 12:16:11 +00:00
Default: 10000
2013-12-04 17:03:06 -05:00
.TP
\fB MaxEmbeddedPE SIZE\fR
This option sets the maximum size of a file to check for embedded PE.
.br
Files larger than this value will skip the additional analysis step.
.br
Negative values are not allowed.
.br
Default: 10M
.TP
\fB MaxHTMLNormalize SIZE\fR
This option sets the maximum size of a HTML file to normalize.
.br
HTML files larger than this value will not be normalized or scanned.
.br
Negative values are not allowed.
.br
Default: 10M
.TP
\fB MaxHTMLNoTags SIZE\fR
This option sets the maximum size of a normalized HTML file to scan.
.br
HTML files larger than this value after normalization will not be scanned.
.br
Negative values are not allowed.
.br
Default: 2M
.TP
\fB MaxScriptNormalize SIZE\fR
This option sets the maximum size of a script file to normalize.
.br
Script content larger than this value will not be normalized or scanned.
.br
Negative values are not allowed.
.br
Default: 5M
.TP
\fB MaxZipTypeRcg SIZE\fR
This option sets the maximum size of a ZIP file to reanalyze type recognition.
.br
ZIP files larger than this value will skip the step to potentially reanalyze as PE.
.br
Negative values are not allowed.
.br
WARNING: setting this limit too high may result in severe damage or impact performance.
.br
Default: 1M
2020-04-01 17:21:46 -07:00
.TP
2014-03-05 17:20:41 -05:00
\fB MaxPartitions SIZE\fR
This option sets the maximum number of partitions of a raw disk image to be scanned.
.br
Raw disk images with more partitions than this value will have up to the value partitions scanned.
.br
Negative values are not allowed.
.br
WARNING: setting this limit too high may result in severe damage or impact performance.
.br
Default: 50
2020-04-01 17:21:46 -07:00
.TP
2014-03-06 18:19:11 -05:00
\fB MaxIconsPE SIZE\fR
This option sets the maximum number of icons within a PE to be scanned.
.br
PE files with more icons than this value will have up to the value number icons scanned.
.br
Negative values are not allowed.
.br
WARNING: setting this limit too high may result in severe damage or impact performance.
.br
Default: 100
2014-03-05 17:20:41 -05:00
.TP
2016-01-19 14:25:55 -05:00
\fB MaxRecHWP3 NUMBER\fR
This option sets the maximum recursive calls to HWP3 parsing function.
.br
HWP3 files using more than this limit will be terminated and alert the user.
.br
Scans will be unable to scan any HWP3 attachments if the recursive limit is reached.
.br
Negative values are not allowed.
.br
WARNING: setting this limit too high may result in severe damage or impact performance.
.br
Default: 16
.TP
2015-02-05 09:09:25 -08:00
\fB PCREMatchLimit NUMBER\fR
2015-02-05 08:30:26 -08:00
This option sets the maximum calls to the PCRE match function during an instance of regex matching.
.br
Instances using more than this limit will be terminated and alert the user but the scan will continue.
.br
For more information on match_limit, see the PCRE documentation.
.br
Negative values are not allowed.
.br
WARNING: setting this limit too high may severely impact performance.
.br
Default: 10000
.TP
\fB PCRERecMatchLimit NUMBER\fR
This option sets the maximum recursive calls to the PCRE match function during an instance of regex matching.
.br
Instances using more than this limit will be terminated and alert the user but the scan will continue.
.br
For more information on match_limit_recursion, see the PCRE documentation.
.br
Negative values are not allowed and values > PCREMatchLimit are superfluous.
.br
WARNING: setting this limit too high may severely impact performance.
.br
2018-07-10 15:20:51 -04:00
Default: 2000
2015-02-05 08:30:26 -08:00
.TP
2015-02-05 09:09:25 -08:00
\fB PCREMaxFileSize SIZE\fR
2015-02-05 08:30:26 -08:00
This option sets the maximum filesize for which PCRE subsigs will be executed.
.br
Files exceeding this limit will not have PCRE subsigs executed unless a subsig is encompassed to a smaller buffer.
.br
Negative values are not allowed.
.br
Setting this value to zero disables the limit.
.br
WARNING: setting this limit too high or disabling it may severely impact performance.
.br
Default: 25M
.TP
2013-12-04 17:03:06 -05:00
\fB OnAccessIncludePath STRING\fR
This option specifies a directory (including all files and directories inside it), which should be scanned on access. This option can be used multiple times.
.br
Default: disabled
.TP
\fB OnAccessExcludePath STRING\fR
This option allows excluding directories from on-access scanning. It can be used multiple times.
.br
Default: disabled
.TP
2017-12-13 14:48:16 -05:00
\fB OnAccessExcludeRootUID BOOL\fR
2021-05-27 13:15:52 -07:00
With this option you can exclude the root UID (0). Processes run under root will be able to access all files without triggering scans or permission denied events.
2017-12-13 16:56:30 -05:00
.br
Note that if clamd cannot check the uid of the process that generated an on-access scan event (e.g., because \fB OnAccessPrevention\fR was not enabled, and the process already exited), clamd will perform a scan. Thus, setting \fB OnAccessExcludeRootUID\fR is not \fI guaranteed\fR to prevent every access by the root user from triggering a scan (unless \fB OnAccessPrevention\fR is enabled).
2017-12-13 14:48:16 -05:00
.br
Default: no
.TP
2013-12-04 17:03:06 -05:00
\fB OnAccessExcludeUID NUMBER\fR
2021-05-27 13:15:52 -07:00
With this option you can exclude specific UIDs. Processes with these UIDs will be able to access all files without triggering scans or permission denied events.
2013-12-04 17:03:06 -05:00
.br
This option can be used multiple times (one per line).
.br
2021-05-27 13:15:52 -07:00
Note: using a value of 0 on any line will disable this option entirely. To exclude the root UID (0) please enable the OnAccessExcludeRootUID option.
2017-12-13 14:48:16 -05:00
.br
2017-12-13 16:56:30 -05:00
Also note that if clamd cannot check the uid of the process that generated an on-access scan event (e.g., because \fB OnAccessPrevention\fR was not enabled, and the process already exited), clamd will perform a scan. Thus, setting \fB OnAccessExcludeUID\fR is not \fI guaranteed\fR to prevent every access by the specified uid from triggering a scan (unless \fB OnAccessPrevention\fR is enabled).
.br
2013-12-04 17:03:06 -05:00
Default: disabled
.TP
2019-07-18 13:06:24 -04:00
\fB OnAccessExcludeUname STRING\fR
This option allows exclusions via user names when using the on-access scanning client. It can be used multiple times, and has the same potential race condition limitations of the OnAccessExcludeUID option.
.br
Default: disabled
.TP
2013-12-04 17:03:06 -05:00
\fB OnAccessMaxFileSize SIZE\fR
Files larger than this value will not be scanned in on access.
.br
2004-09-26 01:28:55 +00:00
Default: 5M
2013-12-04 17:03:06 -05:00
.TP
2019-07-18 13:06:24 -04:00
\fB OnAccessMaxThreads NUMBER\fR
Max number of scanning threads to allocate to the OnAccess thread pool at startup. These threads are the ones responsible for creating a connection with the daemon and kicking off scanning after an event has been processed. To prevent clamonacc from consuming all clamd's resources keep this lower than clamd's max threads.
.br
Default: 5
.TP
\fB OnAccessCurlTimeout NUMBER\fR
Max amount of time (in milliseconds) that the OnAccess client should spend for every connect, send, and recieve attempt when communicating with clamd via curl.
.br
Default: 5000 (5 seconds)
.TP
2015-10-01 16:01:39 -04:00
\fB OnAccessMountPath STRING\fR
Specifies a mount point (including all files and directories under it), which should be scanned on access. This option can be used multiple times.
.br
Default: disabled
.TP
\fB OnAccessDisableDDD BOOL\fR
Disables the dynamic directory determination system which allows for recursively watching include paths.
.br
Default: no
.TP
\fB OnAccessPrevention BOOL\fR
Enables fanotify blocking when malicious files are found.
.br
Default: disabled
.TP
2019-07-18 13:06:24 -04:00
\fB OnAccessRetryAttempts NUMBER\fR
Number of times the OnAccess client will retry a failed scan due to connection problems (or other issues).
.br
Default: 0
.TP
\fB OnAccessDenyOnError BOOL\fR
When using prevention, if this option is turned on, any errors that occur during scanning will result in the event attempt being denied. This could potentially lead to unwanted system behaviour with certain configurations, so the client defaults this to off and prefers allowing access events in case of scan or connection error.
.br
Default: no
.TP
\fB OnAccessExtraScanning BOOL\fR
Toggles extra scanning and notifications when a file or directory is created or moved.
.br
Requires the DDD system to kick-off extra scans.
.br
Default: no
.TP
2013-12-04 17:03:06 -05:00
\fB DisableCertCheck BOOL\fR
Disable authenticode certificate chain verification in PE files.
.br
Default: no
2009-04-03 11:09:00 +00:00
.SH "NOTES"
2020-04-01 17:21:46 -07:00
.LP
2018-02-21 15:00:59 -05:00
All options expressing a size are limited to max 4GB. Values in excess will be reset to the maximum.
2004-09-26 01:28:55 +00:00
.SH "FILES"
2020-04-01 17:21:46 -07:00
.LP
2021-07-28 14:52:39 -07:00
@CONFDIR@/clamd.conf
2013-12-04 17:03:06 -05:00
.SH "AUTHORS"
2020-04-01 17:21:46 -07:00
.LP
2013-12-04 17:03:06 -05:00
Tomasz Kojm <tkojm@clamav.net>, Kevin Lin <klin@sourcefire.com>
2004-09-26 01:28:55 +00:00
.SH "SEE ALSO"
2020-04-01 17:21:46 -07:00
.LP
2010-05-06 17:02:53 +02:00
clamd(8), clamdscan(1), clamav-milter(8), freshclam(1), freshclam.conf(5)