Browse code

docs - updating Usage on-access info

Mickey Sola authored on 2018/11/15 07:51:29
Showing 1 changed files
... ...
@@ -1,7 +1,4 @@
1 1
 # Scanning
2
-
3
-
4 2
 <!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
5 3
 
6 4
 - [Daemon](#daemon)
... ...
@@ -14,21 +11,17 @@
14 14
 
15 15
 <!-- /TOC -->
16 16
 
17
-
18 17
 ## Daemon
19 18
 
20
-
21 19
 ### clamd
22 20
 
23
-`clamd` is a multi-threaded daemon that uses *libclamav* to scan files for viruses. Scanning behaviour can be fully configured to fit most needs by [modifying `clamd.conf`](Configuration.md#clamdconf).
21
+`clamd` is a multi-threaded daemon that uses *libclamav* to scan files for viruses. Scanning behaviour can be fully configured to fit most needs by modifying `clamd.conf`.
24 22
 
25
-As `clamd` requires a virus signature database to run, we recommend setting up ClamAV's official signatures before running `clamd` [using `freshclam`](SignatureManagement.md#freshclam).
23
+As `clamd` requires a virus signature database to run, we recommend setting up ClamAV's official signatures before running `clamd` using `freshclam`.
26 24
 
27 25
 The daemon works by listening for commands on the sockets specified in `clamd.conf`. Listening is supported over both unix local sockets and TCP sockets.
28 26
 
29
-**IMPORTANT:** `clamd` does not currently protect or authenticate traffic coming over the TCP socket, meaning it will accept any and all of the following commands listed from *any* source. Thus, we strongly recommend following best networking practices when setting up your `clamd` instance. **i.e. don't expose your TCP socket to the open Internet.**
27
+**IMPORTANT:** `clamd` does not currently protect or authenticate traffic coming over the TCP socket, meaning it will accept any and all of the following commands listed from *any* source. Thus, we strongly recommend following best networking practices when setting up your `clamd` instance. I.e. don't expose your TCP socket to the Internet.
30 28
 
31 29
 Here is a quick list of the commands accepted by `clamd` over the socket.
32 30
 
... ...
@@ -56,31 +49,27 @@ The daemon also handles the following signals as so:
56 56
 - `SIGHUP` - reopen the log file
57 57
 - `SIGUSR2` - reload the database
58 58
 
59
-It should be noted that `clamd` should not be started using the shell operator `&` or other external tools which would start it as a background process. Instead, you should run `clamd` which will load the database and then daemonize itself (unless you have [specified otherwise in `clamd.conf`](Configuration.md#clamdconf)). After that, clamd is ready to accept connections and perform file scanning.
59
+It should be noted that `clamd` should not be started using the shell operator `&` or other external tools which would start it as a background process. Instead, you should run `clamd` which will load the database and then daemonize itself (unless you have specified otherwise in `clamd.conf`). After that, clamd is ready to accept connections and perform file scanning.
60 60
 
61 61
 Once you have set up your configuration to your liking, and understand how you will be sending commands to the daemon, running `clamd` itself is simple. Simply execute the command:
62 62
 
63 63
 > $ clamd
64 64
 
65
-
66 65
 ### clamdscan
67 66
 
68
-`clamdscan` is a `clamd` client, which greatly simplifies the task of scanning files with `clamd`. It sends commands to the `clamd` daemon across the socket [specified in `clamd.conf`](Configuration.md#clamdconf) and generates a scan report after all requested scanning has been completed by the daemon.
67
+`clamdscan` is a `clamd` client, which greatly simplifies the task of scanning files with `clamd`. It sends commands to the `clamd` daemon across the socket specified in `clamd.conf` and generates a scan report after all requested scanning has been completed by the daemon.
69 68
 
70 69
 Thus, **to run `clamdscan`, you must have an instance of `clamd` already running** as well.
71 70
 
72
-Please keep in mind, that as a simple scanning client, `clamdscan` cannot change scanning and engine configurations. These are tied to the `clamd` instance and the [configuration you set up in `clamd.conf`](Configuration.md#clamdconf). Therefore, while `clamdscan` will accept many of the same commands as its sister tool `clamscan`, it will simply ignore most of them as (by design) no mechanism exists to make ClamAV engine configuration changes over the `clamd` socket.
71
+Please keep in mind, that as a simple scanning client, `clamdscan` cannot change scanning and engine configurations. These are tied to the `clamd` instance and the configuration you set up in `clamd.conf`. Therefore, while `clamdscan` will accept many of the same commands as its sister tool `clamscan`, it will simply ignore most of them as (by design) no mechanism exists to make ClamAV engine configuration changes over the `clamd` socket.
73 72
 
74
-Again, running `clamdscan`, once you have a [working `clamd` instance](#clamd), is simple:
73
+Again, running `clamdscan`, once you have a working `clamd` instance, is simple:
75 74
 
76 75
 > $ clamdscan [*options*] [*file/directory/-*]
77 76
 
78
-
79 77
 ### clamdtop
80 78
 
81
-`clamdtop` is a tool to monitor one or multiple instances of `clamd`. It has a colorized *ncurses* interface, which shows each job queued, memory usage, and information about the loaded signature database for the connected `clamd` instance(s). By default it will attempt to connect to the local `clamd` as [defined in `clamd.conf`](Configuration.md#clamdconf). However, you can specify other `clamd` instances at the command line.
79
+`clamdtop` is a tool to monitor one or multiple instances of `clamd`. It has a colorized *ncurses* interface, which shows each job queued, memory usage, and information about the loaded signature database for the connected `clamd` instance(s). By default it will attempt to connect to the local `clamd` as defined in `clamd.conf`. However, you can specify other `clamd` instances at the command line.
82 80
 
83 81
 To learn more, use the commands
84 82
 
... ...
@@ -90,25 +79,23 @@ or
90 90
 
91 91
 > $ clamdtop --help
92 92
 
93
-
94 93
 ### On-Access Scanning
95 94
 
95
+There is a special thread in `clamd` that performs On-Access Scanning under Linux. This thread shares the virus signature database with the daemon and is capable of blocking discovered threats at the kernel level, although by default it is only configured to alert on detection.
96 96
 
97
-To be updated.
97
+You can can set-up On-Access Scanning [through `clamd.conf`](Configuration.md#on-access-scanning) and learn more about the options available to you by reading the [On-Access Scanning User Guide](../OnAccess.md).
98 98
 
99
+Once you have set up the On-Access Scanner to your liking, you will need to run `clamd` as *root* (or another user with elevated permissions) to start it:
99 100
 
100
-## One-Time Scanning
101
+> $ sudo clamd
101 102
 
103
+## One-Time Scanning
102 104
 
103 105
 ### clamscan
104 106
 
105 107
 `clamscan` is a command line tool which uses *libclamav* to scan files and/or directories for viruses. Unlike `clamdscan`, `clamscan` does *not* require a running `clamd` instance to function. Instead, `clamscan` will create a new engine and load in the virus database each time it is run. It will then scan the files and/or directories specified at the command line, create a scan report, and exit.
106 108
 
107
-By default, when loading databases, `clamscan` will check the location to which [`freshclam` installed the virus database signatures](SignatureManagement.md#freshclam). This behaviour, along with a myriad of other scanning and engine controls, can be modified by providing flags and other options at the command line.
109
+By default, when loading databases, `clamscan` will check the location to which `freshclam` installed the virus database signatures. This behaviour, along with a myriad of other scanning and engine controls, can be modified by providing flags and other options at the command line.
108 110
 
109 111
 There are too many options to list all of them here. So we'll only cover a few common and more interesting ones:
110 112