Andre Robatino wrote:
St?phane VOLTZ wrote:
Le mardi 11 juillet 2006 01:36, Andre Robatino a ?crit :
My father has a Umax Astra 2000P parallel port scanner. At present
it's accessible only as root. Before the advent of udev, it was
possible to access as an ordinary user by changing the permission of
/dev/parport0 from 660 to 666. Since udev appeared in Fedora 2,
another
solution is needed. After reading sane man pages, we've done the
following:
1) In /etc/sane.d/dll.conf, uncommented umax_pp.
2) In /etc/sane.d/net.conf, uncommented localhost.
3) In /etc/xinetd.d, created a file sane-port with the contents:
# default: off
# description: The sane server accepts requests
# for network access to a local scanner via the
# network.
service sane-port
{
port= 6566
socket_type = stream
wait= no
user= root
group = root
server = /usr/sbin/saned
}
This is copied from the template in the saned man page, with the user
and group changed from saned to root, since user and group saned don't
exist, and since running as root would allow direct hardware access. I
didn't add localhost to /etc/sane.d/sane.conf since the saned man
page
says that connections from localhost are always permitted. The file
/etc/services already contains the lines
sane-port 6566/tcp# SANE Control Port
sane-port 6566/udp# SANE Control Port
Ordinary user access still doesn't work. What's wrong?
Hello,
I haven't enough saned experience to tell you what might going
on. But I have the feeling the trouble oyu have with /dev/parport0
may just be an issue with 'ppdev' kernel module autoloading. Can
you send the debug messages of 'scanimage -L' with the environment
variables SANE_DEBUG_UMAX_PP and SANE_DEBUG_UMAX_PP_LOW set to 255 ?
There will be traces of which device is used or not, and some
informations why they are used.
Regards,
Stef
I have a different scanner, and I tried scanimage -L with the
corresponding debug variable, and there was no additional output. So
I think that the Fedora software isn't compiled with debug support.
My father is a naive user and I have to read each command over the
phone, so I can't ask him to compile from source. However, we
determined that after running scanimage -L or xsane as root, the
ppdev and parport modules are loaded and stay loaded. But even then,
it's still impossible to access the scanner as an ordinary user. Then
we tried using the line port 0x378 in umax_pp.conf, and in this case
the scanner can't be accessed even as root, even though the scanner is
definitely on /dev/parport0 (we were previously using port
/dev/parport0 which allows root access).
We finally solved the problem. First, it turned that xinetd wasn't
installed, even though the directory /etc/xinetd.d existed (it and the
files in it were owned by other packages), so we installed it. Second,
the sane-port lines didn't exist in /etc/services in FC4, even though
they exist in FC5, so we added those (though I don't know if it matters
since the port was specified in /etc/xinetd.d/sane-port). Finally, as
you suspected, it was a problem with ppdev. Even though ppdev can be
loaded as an ordinary user, for some reason this wasn't happening. So
we just edited a config file to load ppdev at boot time. (As an aside,
it was possible to get debugging output by setting the DEBUG_UMAX_PP*
variables as you suggested. The first time I tried it, I forgot to use
the word export.)
If you have any idea as to why the ppdev module fails to load
automatically when attempting access as an ordinary user, even though it
works as root, please let me know. I'd like to file a bug report if it
doesn't already exist.