Re: F7 Kernel 2.6.22.1-33.fc7 Scanner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Saltzman wrote:
> On Sat, 2007-07-28 at 20:20 -0500, Mikkel L. Ellertson wrote:
>> antonio montagnani wrote:
>>> After updating still I can't use my scanner as normal user: as root it works.
>>> Two kernels older it was working.
>>> When someone will care to solve the problem???
>>>
>> that sounds like console.perms is not being called when the scanner
>> is added. Console.perms should set the "owner" of the scanner to the
>> user logged in at the console.
> 
> I see this issue as well, but my scanner is attached to a machine that
> doesn't have a console.  I want to log in via ssh and run xsane, but if
> console.perms is handling the ownership change, then I won't be able to
> run xsane as a user that way.  My issue is not related to the kernel
> version, but it seems that failure to call console.perms would not be,
> either.
> 
> My cheap hack is to create a scanner group and change the device's
> permissions to allow users in that group to read and write to the
> device.  That solution isn't preserved across reboots without hacking
> some UDEV configs and of course, it isn't preserved across OS upgrades.
> In addition, it doesn't prevent multiple users from accessing the
> device.  Fortunately, I'm the only user at the moment.
> 
> Is there a better solution for my setup?
> 
I can think of a couple of ways that will survive across reboots.
Probably the simplest one is to exit
/etc/security/console.perms.d/50-default.perms and change:

<console>  0600 <scanner>    0600 root
<console>  0600 <scanner>    0660 root.scanner

This should set the default permission to 660 and the default
owner/group to root/scanner.

Another way would be to create a udev rules file to set the
permissions. If you create a file in /etc/udev/rules.d called
something like 61-scanner-perms.rule and put a rule in it that sets
the permission on the scanner and uses opeions="last_rule" so that
95-pam-console.rules never gets processed. But I am not sure what
you would want to match against. You could use your scanner ID
information if you want to limit it to just your specific scanner.

SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="0101", ACTION=="add",
GROUP="scanner", MODE="0660", OPTIONS="last_rule"

replacing 03f0 and 0101 with the correct values for your scanner.
This have the advantage of not modifying stock config files, so it
should survive any updates. The disadvantage is that if you change
scanners, you have to modify the rule, or add another one. I can not
play with the rules right now, because I use a network scanner. I
have a USB scanner stored away somewhere.

You should not have problems with more then one program trying to
access the scanner at the same time - file locking should take care
of that. But someone else that can access the same machine could
scan a copy of what you are scanning before/after you get your scan.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux