Debian Codegraph @

upstream/debian-trixie/man8/saned.8

raw
1 .TH saned 8 "29 Sep 2017" "" "SANE Scanner Access Now Easy"
2 .IX saned
3 .SH NAME
4 saned \- SANE network daemon
5 .SH SYNOPSIS
6 .B saned
7 .B [ \-a
8 .I [ username ]
9 .B ]
10 .B [ \-u
11 .I username
12 .B ]
13 .B [ \-b
14 .I address
15 .B ]
16 .B [ \-p
17 .I port
18 .B ]
19 .B [ \-l ]
20 .B [ \-D ]
21 .B [ \-o ]
22 .B [ \-d
23 .I n
24 .B ]
25 .B [ \-e ]
26 .B [ \-h ]
27 .B [ \-B
28 .I buffer-size
29 .B ]
30
31 .SH DESCRIPTION
32 .B saned
33 is the SANE (Scanner Access Now Easy) daemon that allows remote clients
34 to access image acquisition devices available on the local host.
35
36 .SH OPTIONS
37 .PP
38 .B saned
39 recognises the following options:
40
41 .TP
42 .BR \-a "\fI [username]\fR, " \-\-alone [=\fIusername]\fR
43 is equivalent to the combination of
44 .B \-l \-D \-u
45 .I username
46 options. However,
47 .I username
48 is optional and running user will only be set when specified.
49
50 .TP
51 .BR \-u "\fI username\fR, " \-\-user =\fIusername\fR
52 requests that
53 .B saned
54 drop root privileges and run as the user (and group) associated with
55 .I username
56 after binding.
57
58 .TP
59 .BR \-b "\fI address\fR, " \-\-bind =\fIaddress\fR
60 tells
61 .B saned
62 to bind to the
63 .I address
64 given.
65
66 .TP
67 .BR \-p "\fI port\fR, " \-\-port=\fIport\fR
68 tells
69 .B saned
70 to listen on the
71 .I port
72 given. A value of 0 tells
73 .B saned
74 to pick an unused port. The default is the
75 .B sane-port (6566).
76
77 .TP
78 .BR \-l ", " \-\-listen
79 requests that
80 .B saned
81 run in standalone daemon mode. In this mode,
82 .B saned
83 will listen for incoming client connections;
84 .BR inetd (8)
85 is not required for
86 .B saned
87 operations in this mode.
88
89 .TP
90 .BR \-D ", " \-\-daemonize
91 will request
92 .B saned
93 to detach from the console and run in the background.
94
95 .TP
96 .BR \-o ", " \-\-once
97 requests that
98 .B saned
99 exits after the first client disconnects. This is useful for debugging.
100
101 .TP
102 .BR \-d "\fI n\fR, " \-\-debug =\fIn\fR
103 sets the level of
104 .B saned
105 debug output to
106 .IR n .
107 When compiled with debugging enabled, this flag may be
108 followed by a number to request more or less debug info. The larger
109 the number, the more verbose the debug output. E.g.,
110 .B \-d128
111 will request output of all debug info. A level of 0 produces no
112 output at all. The default value is 2.
113
114 .TP
115 .BR \-e ", " \-\-stderr
116 will divert
117 .B saned
118 debug output to stderr instead of the syslog default.
119
120 .TP
121 .BR \-B ", " \-\-buffer-size=\fIbuffer\-size\fR
122 specifies the size of the read buffer used for communication with the backend in KB.
123 Default value is 1MB.
124
125 .TP
126 .BR \-h ", " \-\-help
127 displays a short help message.
128
129 .SH CONFIGURATION
130 The
131 .I saned.conf
132 configuration file contains both options for the daemon and the access
133 list.
134 .TP
135 \fBdata_portrange\fP = \fImin_port\fP - \fImax_port\fP
136 Specify the port range to use for the data connection. Pick a port
137 range between 1024 and 65535; don't pick a too large port range, as it
138 may have performance issues. Use this option if your
139 .B saned
140 server is sitting behind a firewall. If that firewall is a Linux
141 machine, we strongly recommend using the Netfilter
142 \fInf_conntrack_sane\fP module instead.
143 .TP
144 \fBdata_connect_timeout\fP = \fItimeout\fP
145 Specify the time in milliseconds that
146 .B saned
147 will wait for a data
148 connection. Without this option, if the data connection is not done
149 before the scanner reaches the end of scan, the scanner will continue
150 to scan past the end and may damage it depending on the
151 backend. Specify zero to have the old behavior. The default is 4000ms.
152 .PP
153 The access list is a list of host names, IP addresses or IP subnets
154 (CIDR notation) that are permitted to use local SANE devices. IPv6
155 addresses must be enclosed in brackets, and should always be specified
156 in their compressed form. Connections from localhost are always
157 permitted. Empty lines and lines starting with a hash mark (#) are
158 ignored. A line containing the single character ``+'' is interpreted
159 to match any hostname. This allows any remote machine to use your
160 scanner and may present a security risk, so this shouldn't be used
161 unless you know what you're doing.
162 .PP
163 A sample configuration file is shown below:
164 .PP
165 .RS
166 # Daemon options
167 .br
168 data_portrange = 10000 - 10100
169 .br
170 # Access list
171 .br
172 scan\-client.somedomain.firm
173 .br
174 # this is a comment
175 .br
176 192.168.0.1
177 .br
178 192.168.2.12/29
179 .br
180 [::1]
181 .br
182 [2001:db8:185e::42:12]/64
183 .RE
184 .PP
185 The case of the host names does not matter, so AHost.COM is considered
186 identical to ahost.com.
187 .SH FILES
188 .TP
189 .I /etc/hosts.equiv
190 The hosts listed in this file are permitted to access all local SANE
191 devices. Caveat: this file imposes serious security risks and its use
192 is not recommended.
193 .TP
194 .I /etc/sane.d/saned.conf
195 Contains a list of hosts permitted to access local SANE devices (see
196 also description of
197 .B SANE_CONFIG_DIR
198 below).
199 .TP
200 .I /etc/sane.d/saned.users
201 If this file contains lines of the form
202
203 user:password:backend
204
205 access to the listed backends is restricted. A backend may be listed multiple
206 times for different user/password combinations. The server uses MD5 hashing
207 if supported by the client.
208 .SH ENVIRONMENT
209 .TP
210 .B SANE_CONFIG_DIR
211 This environment variable specifies the list of directories that may
212 contain the configuration file. On *NIX systems, the directories are
213 separated by a colon (`:'), under OS/2, they are separated by a
214 semi-colon (`;'). If this variable is not set, the configuration file
215 is searched in two default directories: first, the current working
216 directory (".") and then in
217 .IR /etc/sane.d .
218 If the value of the
219 environment variable ends with the directory separator character, then
220 the default directories are searched after the explicitly specified
221 directories. For example, setting
222 .B SANE_CONFIG_DIR
223 to "/tmp/config:" would result in directories
224 .IR tmp/config ,
225 .IR . ,
226 and
227 .I "/etc/sane.d"
228 being searched (in this order).
229
230 .SH NOTES
231 .B saned
232 does
233 .I not
234 provide confidentiality when communicating with clients. If
235 .B saned
236 is exposed directly on the network, other users may be able to intercept
237 scanned images, or learn passwords for connecting to
238 .BR saned ,
239 with little effort. Client systems should connect to
240 .B saned
241 through a secure tunnel to the server instead.
242 .PP
243 .B saned
244 is not a trusted program and should not run with root privileges.
245 .PP
246 Refer to
247 .I /usr/share/doc/libsane/saned/saned.install.md
248 for details on configuring
249 .B saned
250 as a service.
251
252 .SH "SEE ALSO"
253 .BR sane (7),
254 .BR scanimage (1),
255 .BR xscanimage (1),
256 .BR xcam (1),
257 .BR sane\-dll (5),
258 .BR sane\-net (5),
259 .BR sane\-"backendname" (5),
260 .BR inetd (8),
261 .BR xinetd (8),
262 .BR systemd (1)
263 .br
264 .I http://www.penguin-breeder.org/?page=sane\-net
265 .SH AUTHOR
266 David Mosberger