The daemon listens for incoming connections on Unix and/or TCP socket and scans files or directories on demand. It reads the configuration from @CFGDIR@/clamd.conf
.LP
The daemon listens for incoming connections on Unix and/or TCP socket and scans files or directories on demand. It reads the configuration from @CONFDIR@/clamd.conf
.SH"COMMANDS"
.LP
.LP
It's recommended to prefix clamd commands with the letter \fBz\fR (eg. zSCAN) to indicate that the command will be delimited by a NULL character and that clamd should continue reading command data until a NULL character is read. The null delimiter assures that the complete command and its entire argument will be processed as a single command. Alternatively commands may be prefixed with the letter \fBn\fR (e.g. nSCAN) to use a newline character as the delimiter. Clamd replies will honour the requested terminator in turn.
If clamd doesn't recognize the command, or the command doesn't follow the requirements specified below, it will reply with an error message, and close the connection.
.LP
Clamd recognizes the following commands:
.TP
.TP
\fBPING\fR
Check the server's state. It should reply with "PONG".
.TP
.TP
\fBVERSION\fR
Print program and database versions.
.TP
.TP
\fBRELOAD\fR
Reload the virus databases.
.TP
.TP
\fBSHUTDOWN\fR
Perform a clean exit.
.TP
.TP
\fBSCAN file/directory\fR
Scan a file or a directory (recursively) with archive support enabled (if not disabled in clamd.conf). A full path is required.
.TP
.TP
\fBCONTSCAN file/directory\fR
Scan file or directory (recursively) with archive support enabled and don't stop the scanning when a virus is found.
.TP
.TP
\fBMULTISCAN file/directory\fR
Scan file in a standard way or scan directory (recursively) using multiple threads (to make the scanning faster on SMP machines).
.TP
.TP
\fBALLMATCHSCAN file/directory\fR
ALLMATCHSCAN works just like SCAN except that it sets a mode where scanning continues after finding a match within a file.
.TP
@ -83,54 +83,54 @@ their version, without the commands list.
This command can be used as an easy way to check for IDSESSION support for
example.
.LP
.TP
.TP
\fBDEPRECATED COMMANDS\fR
.TP
\fBSTREAM\fR
Scan stream \- on this command clamd will return "PORT number" you should connect to and send data to scan. (\fBDEPRECATED\fR, use INSTREAM instead)
Scan stream \- on this command clamd will return "PORT number" you should connect to and send data to scan. (\fBDEPRECATED\fR, use INSTREAM instead)
.LP
.TP
\fBNOT SUPPORTED COMMANDS\fR
.TP
.TP
\fBSESSION, END\fR
Start/end a clamd session which will allow you to run multiple commands per TCP session. (use IDSESSION instead)
Don't fork into background (for use in daemon mode).
.TP
\fB\-u USER, \-\-user USER\fR
Run as USER. By default (when started by root) freshclam drops privileges and operates as the '@CLAMAVUSER@' user.
Run as USER. By default (when started by root) freshclam drops privileges and operates as the '@CLAMAV_USER@' user.
.TP
\fB\-\-no\-dns\fR
This option forces old non\-DNS verification method (without a TTL delay).
@ -61,7 +61,7 @@ This option forces old non\-DNS verification method (without a TTL delay).
Check #n times per day for a new database. #n must be between 1 and 50.
.TP
\fB\-\-datadir=DIRECTORY\fR
Install new database in DIRECTORY. The directory must be writable for the '@CLAMAVUSER@' user or unprivileged user running freshclam.
Install new database in DIRECTORY. The directory must be writable for the '@CLAMAV_USER@' user or unprivileged user running freshclam.
.TP
\fB\-\-daemon\-notify=/path/to/clamd.conf\fR
Notify the daemon about the new database. By default it reads a hardcoded config file but you can use a different one. Both local and TCP sockets are supported.
@ -121,14 +121,14 @@ Some return codes of freshclam can be overwritten with a built-in command EXIT_n
.TP
59: Mirrors are not fully synchronized (try again later).
.TP
60: Can't get information about '@CLAMAVUSER@' user from /etc/passwd.
60: Can't get information about '@CLAMAV_USER@' user from /etc/passwd.