saned(8)
๐ saned(8) โ SANE Scanner Access Now Easy ๐
okay bestie, gather round, because we're talking about saned โ the SANE network daemon. yes it's a whole manual page, yes it's from saned(8), and yes we're gonna make it cute AND correct. no cap. ๐ซถ
โจ NAME โจ
saned โ the SANE network daemon. that's it, that's the name, and it's iconic. ๐
โจ SYNOPSIS โจ
saned [ -a [ username ] ] [ -u username ] [ -b address ] [ -p port ] [ -l ] [ -D ] [ -o ] [ -d n ] [ -e ] [ -h ] [ -B buffer-size ]
look at all those little flags, living their best lives. ๐
โจ DESCRIPTION โจ
so saned is the SANE (that's Scanner Access Now Easy, and yes the acronym spells SANE, we love an acronym that ate) daemon. what does it do? it lets remote clients reach the image acquisition devices that are chillin' on the local host. that's the whole vibe. scanner go brrr but over the network. ๐
โจ OPTIONS โจ
saned recognises the following options, and bestie we are listing ALL of them:
-a [username],--alone[=username]โ this one is literally just-l -D -u usernamebundled together like a lil combo meal ๐. BUT the username is optional here โ the running user only gets set when you actually specify one. lowkey efficient.-u username,--user=usernameโ asks saned to drop root privileges and run as the user (and group, don't forget the group) associated with username, and it does this after binding. after. binding. important order, bestie.-b address,--bind=addressโ tells saned to bind to the address you give it. that's it. that's the flag.-p port,--port=portโ tells saned to listen on the port you give it. a value of0tells it to just pick an unused port for you (chaotic but generous โจ). the default is the sane-port, aka6566.-l,--listenโ asks saned to run in standalone daemon mode. in this mode it listens for incoming client connections all by itself, andinetd(8)is not required for saned operations in this mode. independent queen energy. ๐-D,--daemonizeโ requests that saned detach from the console and run in the background. bye console, it's giving mysterious. ๐ฆ-n,--allow-networkโ lets saned use network scanners. by default this is forbidden, and the reason is so cute: it's to prevent saned from contacting itself ๐ญ. when you enable it, the configuration of thesane-net(5)backend should not mention the address on which saned is listening.-o,--onceโ requests that saned exits after the first client disconnects. useful for debugging, aka the "one and done" setting ๐.-d n,--debug=nโ sets the level of saned debug output to n. when compiled with debugging enabled, this flag may be followed by a number to request more or less debug info. the larger the number, the more verbose the debug output. e.g.,-d128will request output of all debug info. a level of0produces no output at all. the default value is2. she's chatty by default, we respect it.-e,--stderrโ diverts saned debug output tostderrinstead of the syslog default. your logs, your choice. โจ-B,--buffer-size=buffer-sizeโ specifies the size of the read buffer used for communication with the backend, in KB. default value is1MB.-h,--helpโ displays a short help message. we love a helpful queen ๐ซถ.
โจ CONFIGURATION โจ
the saned.conf configuration file contains both the options for the daemon and the access list. two jobs, one file, main character energy fr fr.
data_portrange = min_port - max_portโ specify the port range to use for the data connection. pick a port range between1024and65535. don't pick a too large port range, because it may have performance issues. use this option if your saned server is sitting behind a firewall. if that firewall is a Linux machine, we strongly recommend using the Netfilternf_conntrack_sanemodule instead.data_connect_timeout = timeoutโ specify the time in milliseconds that saned will wait for a data connection. without this option, if the data connection is not done before the scanner reaches the end of scan, the scanner will continue to scan past the end and may damage it depending on the backend ๐ญ. specify zero to have the old behavior. the default is4000ms.
๐ธ the access list ๐ธ
the access list is a list of host names, IP addresses or IP subnets (CIDR notation) that are permitted to use local SANE devices.
- IPv6 addresses must be enclosed in brackets, and should always be specified in their compressed form.
- connections from localhost are always permitted. bestie privileges. ๐ซถ
- empty lines and lines starting with a hash mark (
#) are ignored. - a line containing the single character
+is interpreted to match any hostname. this allows any remote machine to use your scanner and may present a security risk, so this shouldn't be used unless you know what you're doing. ๐
a sample configuration file is shown below:
# Daemon options
data_portrange = 10000 - 10100
# Access list
scan-client.somedomain.firm
# this is a comment
192.168.0.1
192.168.2.12/29
[::1]
[2001:db8:185e::42:12]/64
the case of the host names does not matter, so AHost.COM is considered identical to ahost.com. slay, case-insensitive. ๐
โจ FILES โจ
/etc/hosts.equivโ the hosts listed in this file are permitted to access all local SANE devices. caveat: this file imposes serious security risks and its use is not recommended. like, at all. ๐/etc/sane.d/saned.confโ contains a list of hosts permitted to access local SANE devices (see also the description ofSANE_CONFIG_DIRbelow)./etc/sane.d/saned.usersโ if this file contains lines of the form
user:password:backend
access to the listed backends is restricted. a backend may be listed multiple times for different user/password combinations. the server uses MD5 hashing if supported by the client. ๐
โจ ENVIRONMENT โจ
SANE_CONFIG_DIRโ this environment variable specifies the list of directories that may contain the configuration file. on *NIX systems, the directories are separated by a colon (:); under OS/2, they are separated by a semi-colon (;). if this variable is not set, the configuration file is searched in two default directories: first, the current working directory (".") and then in/etc/sane.d. if the value of the environment variable ends with the directory separator character, then the default directories are searched after the explicitly specified directories. for example, settingSANE_CONFIG_DIRto"/tmp/config:"would result in directoriestmp/config,., and/etc/sane.dbeing searched (in this order). look at her go, searching in order like a well-behaved icon. ๐
โจ NOTES โจ
saned does not provide confidentiality when communicating with clients. if saned is exposed directly on the network, other users may be able to intercept scanned images, or learn passwords for connecting to saned, with little effort. client systems should connect to saned through a secure tunnel to the server instead. seriously bestie, tunnel up. ๐
saned is not a trusted program and should not run with root privileges. periodt.
refer to /usr/share/doc/sane-backends/saned/saned.install.md for details on configuring saned as a service. ๐
โจ SEE ALSO โจ
sane(7), scanimage(1), xscanimage(1), xcam(1), sane-dll(5), sane-net(5), sane-"backendname"(5), inetd(8), xinetd(8), systemd(1)
http://www.penguin-breeder.org/?page=sane-net
go read those too, they're all part of the friend group. ๐ฆ
โจ AUTHOR โจ
David Mosberger โ the author, the legend, the moment. ๐
and that's the whole page bestie!! ๐ written by David Mosberger, dated 29 Sep 2017, and it lives in the saned(8) section of the manual, under SANE Scanner Access Now Easy. go configure your scanner, use a secure tunnel, and never run it as root. mwah ๐ โจ
๐ฆ where this page comes from
- alpine 3.24: sane-doc 1.4.0-r4 ยท GPL-2.0-or-later GPL-2.0-or-later-with-sane-exception Public-Domain
- fedora 43: sane-backends-daemon 1.4.0-4.fc43 ยท GPL-2.0-or-later WITH SANE-exception AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND IJG AND MIT
- fedora 44: sane-backends-daemon 1.4.0-6.fc44 ยท GPL-2.0-or-later WITH SANE-exception AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND IJG AND MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms