LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   usb scanner permissions problem (https://www.linuxquestions.org/questions/slackware-14/usb-scanner-permissions-problem-606100/)

leopold_2006 12-11-2007 02:04 PM

usb scanner permissions problem
 
I have slackware 12, and epson perfection 1670. Scanner works perfectly on debian/ubuntu/gentoo with non-root users.
Now it works only under root. I thought that problem is in udev, but all setting are ok(I think).

with root:
scanimage -L
device `snapscan:libusb:001:003' is a EPSON EPSON Scanner flatbed scanner

with other users:
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

How to make right permissions after pluging in scanner if /etc/udev/rules.d/80-libsane.rules:

ACTION!="add", GOTO="libsane_rules_end"
SUBSYSTEM!="usb_device", GOTO="libsane_rules_end"
# EPSON Perfection 1670 | EPSON Perfection 1670 PHOTO | Epson Perfection 1670
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="011f", MODE="660", GROUP="scanner"
LABEL="libsane_rules_end"

H_TeXMeX_H 12-11-2007 02:14 PM

Are you a member of group "scanner" ? You must be. Check '/etc/group'

leopold_2006 12-11-2007 02:21 PM

yes i'm a member of group scanner, and also plugdev
I can work with scanner only after i do this:
chmod a+rw /proc/bus/usb/001/00.

H_TeXMeX_H 12-11-2007 02:37 PM

Then, maybe you could try changing this rule:

Quote:

Originally Posted by leopold_2006 (Post 2987433)
How to make right permissions after pluging in scanner if /etc/udev/rules.d/80-libsane.rules:

ACTION!="add", GOTO="libsane_rules_end"
SUBSYSTEM!="usb_device", GOTO="libsane_rules_end"
# EPSON Perfection 1670 | EPSON Perfection 1670 PHOTO | Epson Perfection 1670
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="011f", MODE="660", GROUP="scanner"
LABEL="libsane_rules_end"

Instead of:
Code:

MODE="660"
put:
Code:

MODE="664"
or if the above doesn't work,
Code:

MODE="666"

leopold_2006 12-11-2007 02:46 PM

after changing mode it doesn't work
I tried udevtest to watch what's happening when i reboot
udevtest /class/usb_endpoint/usbdev2.2_ep81/
....
udev_node_add: creating device node '/dev/usbdev2.2_ep81', major=254, minor=11, mode=0660, uid=0, gid=0
....

This is very strange because in /etc/udev/rules.d/80-libsane.rules gid is another (for group scanner)

leopold_2006 12-11-2007 03:55 PM

problem solved
 
I added this line into /etc/udev/rules.d/50-udev-default.rules in libusb section.
SUBSYSTEM=="usb", ATTRS{idProduct}=="011f", GROUP="scanner", MODE="0660"
Now everything works.

I've seen my problem in the internet but i didnt find any solution. It seems to me to be a bug in a description of devices that use libusb.

H_TeXMeX_H 12-11-2007 04:14 PM

That's odd. Well, glad to see it worked.


All times are GMT -5. The time now is 11:38 PM.