From owner-freebsd-questions@freebsd.org Thu Aug 6 20:45:29 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C42CC9B4E4E for ; Thu, 6 Aug 2015 20:45:29 +0000 (UTC) (envelope-from patrickhess@gmx.net) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40F65DE5 for ; Thu, 6 Aug 2015 20:45:28 +0000 (UTC) (envelope-from patrickhess@gmx.net) Received: from desk8.phess.net ([24.134.51.19]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MIhDo-1ZPexx1qkS-002H9K; Thu, 06 Aug 2015 22:45:25 +0200 From: Patrick Hess To: freebsd-questions@freebsd.org Cc: Anthony Campbell Subject: Re: Permissions problem for sane Date: Thu, 06 Aug 2015 22:45:23 +0200 Message-ID: <1876444.Yqz8SnZpVd@desk8.phess.net> User-Agent: KMail/4.14.3 (FreeBSD/10.1-RELEASE-p16; KDE/4.14.3; i386; ; ) In-Reply-To: <20150806104335.GA27748@ithaca.acampbell.uk> References: <20150806104335.GA27748@ithaca.acampbell.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:h+8pzrZrZ49jxDsHeqY8ZDmi/im5FhdpWGnSE85sPUxhunmdszO TpdfSqwb1cPQbFXH/+ryNWyrrHRWe7btn33IAUS3XqJXNdaWlMG/7wre9hfVZ+y/bOCmFm9 cMVBgz/NcxDx1F2omOqqMCoDzPtfYDGdxMLDT6wb6D6F1h4XsdsFtkUKN1T61rbnKtsrcnh aniypfhHnv6xruejLK76A== X-UI-Out-Filterresults: notjunk:1;V01:K0:GRQPv9PPkIk=:qjuUSBB3bu/pZitb/ETvY0 S0BEpjiuKagoyILzlf7l/ut0sh2/A1I+TueAFdqd8W2PyzkxcmXQ5Tl/FcpEHMAWr2xVe1PY+ USu9Uzt85UJwNWLqi9PpY9fY7uVcuv697bP/yzzFC/Zo21bzMWxK/oE6xwwoeucyuzAvyZ9Ss I67cHvYVHxwfKqvtMngHkKKagRjG7L6uNARIVND1jZAQzagj7J5WcrtwN57hzsRD1oVYcHN/2 Tb6U9pCd6zsBERgVRtiFv1xj+gnClD/c3hn2woVAlFWzQ6gOwHiZE8HFg4/pUgFHAy/UTLxzq 5mLqEmJcIVs87jfv7Z7s7r9LmEuXkkhbsSNLoefz9X61s5hNagAB3WhRPOdpXdnQadWUcU+6M 8DeDtO2ZoiqzCbe56MxGarLLbHYTezgn7JzSfA/t6p6tnTGCAPq1U64yMDPKG1U0Ri+XesWrR xP2xUTWJJBcv53wsz6i5nkQpGfK+ec0dJwZjnVRfc29SQCGpjdpFtGtNVuWjI4LtNSjnKRCO8 CZMtCuxveFiRPBGnvRruh+XNI/IB1SXsEYk7bhblr2BJi1nCi++lAi1/ol/mD96NzAJCi0JWK aXqp8HscUmXrxPbCC+yyW+KMZgHKvVPKs3bnli4yd9Q8Be0+uE8BCGhVRwGWbBvEZiwak1DXS gUYgZJJuu9hZmoR7pXleVI/F0DCAcSIIyO+IVSXI/3cTye/LtvX1ufQV7aVvQPEymYsw= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2015 20:45:29 -0000 Anthony Campbell wrote: > Should I modify the permissions on /dev/ugen0.2? In contrast to what many other people might suggest, I'm personally not a big fan of providing users broad access to all kinds of device nodes. So instead of messing around with permissions, I prefer to make use of the saned(8) network daemon. This is actually pretty straightforward to set up. You'll need to add these two lines to your /etc/rc.conf: saned_enable="YES" saned_uid="root" Now either reboot the machine or run the following command to start the network daemon right away: # service saned start Then add the following line to /usr/local/etc/sane.d/net.conf: localhost Any non-privileged user should now be able to access the scanner. For starters, try to get a list of scanners available on the server: > scanimage -L device `net:localhost:plustek:libusb:/dev/usb:/dev/ugen1.2' is a Canon CanoScan N1240U/LiDE30 flatbed scanner The nice part about using saned(8) is that you can easily make the scanner available to other machines on the network. Just add your network to the server's /usr/local/etc/sane.d/saned.conf and then add an entry for the server to the /usr/local/etc/sane.d/net.conf on each of the clients. Patrick