INsane[d]!

Sunday, December 20. 2009

INsane[d]!

I share my scanner on the network using sane but after reloading my server I found it was not being seen from the network even though it appeared to be working locally.

I saw this kind of stuff in the logs:

Dec 19 15:56:19 localhost saned[32422]: saned (AF-indep+IPv6) from sane-backends 1.0.19 starting up
Dec 19 15:56:17 localhost saned[32422]: check_host: access by remote host: 10.0.0.55
Dec 19 15:56:17 localhost saned[32422]: init: access granted to saned-user@10.0.0.55
Dec 19 15:56:19 localhost saned[32422]: saned exiting


I increased the verbosity but it wasn't any more helpfup:

[saned] check_host: access granted from IP address 10.0.0.55 (in subnet 10.0.0.0/24)
[saned] init: access granted
[saned] init: access granted to saned-user@::ffff:10.0.0.55
[saned] process_request: waiting for request
[saned] process_request: got request 1
[saned] process_request: waiting for request
[saned] process_request: got request 10
[saned] bailing out, waiting for children...
[saned] bail_out: all children exited


After much troubleshooting I realized that while local access worked file, saned was not working when running as user saned, but worked fine if run as root.

Obviously this looked like a permission problem, and it was. I checked the perms on the scanner device, /dev/sg2 and confirmed that saned had no access. But why? I checked the udev rules and found a rule that would give permissions to the scanner group, of which saned is a member. But this rule had set the permissions.

Then I realized that since I booted up with the scanner attached, and then installed sane, the new udev rule would not have had any effect until the device was replugged or the system was rebooted. I restarted udev and un/re-plugged the scanner and then saned worked fine again!

Trackbacks

    No Trackbacks

Comments

Display comments as (Linear | Threaded)

    No comments


Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA 1CAPTCHA 2CAPTCHA 3CAPTCHA 4CAPTCHA 5