this is just a permissions problem? can you get the udev subsystem to set 
the mode of the parport file to something more permissive?

allan

On Tue, 11 Jul 2006, 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).
>
>
> --
> sane-devel mailing list: sane-devel@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>            to sane-devel-requ...@lists.alioth.debian.org
>

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera
From an...@bwh.harvard.edu  Tue Jul 11 19:13:16 2006
From: an...@bwh.harvard.edu (Andre Robatino)
Date: Tue Jul 11 19:14:03 2006
Subject: [sane-devel] using parallel port scanner as ordinary user in
        recent version of Fedora
In-Reply-To: <pine.lnx.4.61.0607111502090.15...@limos.pfeiffer.edu>
References: <44b2e470.5070...@bwh.harvard.edu>
        <200607110712.32435.stef...@modulonet.fr>
        <44b3f488.90...@bwh.harvard.edu>
        <pine.lnx.4.61.0607111502090.15...@limos.pfeiffer.edu>
Message-ID: <44b3f84c.1080...@bwh.harvard.edu>

m. allan noah wrote:
>
> this is just a permissions problem? can you get the udev subsystem to 
> set the mode of the parport file to something more permissive?
>
>>
  It's definitely a permissions problem.  The permissions on 
/dev/parport0 are:

crw-rw---- 1 root lp 99, 0 Jul 11 13:19 /dev/parport0

  Prior to udev we simply changed the permissions to 666 and that 
worked.  On my Fedora box, I tried editing 
/etc/udev/rules.d/50-udev.rules by changing the permissions in the line

KERNEL=="parport*",             GROUP="lp", MODE="0660"

to 666.  This didn't work - after rebooting, the permissions are still 
660.  I read something somewhere about this having something to do with 
pam security which I don't know anything about.  It seems that figuring 
out how to change the permissions to 666 will be at least as difficult 
as finding out how to do this the "right" way.

Reply via email to