Scanner gets wrong permissions (udev rule not applied)
Posted: 1. Feb 2013, 23:01
I found another bug. This time it's the scanner resp. the permissions for the device.
My unprivileged user is in the groups scanner and lp, but the user can't access the scanner and sane-find-scanner doesn't find it while it is listed by lsusb. The problem is that the scanner device in /dev/bus/usb, in my case /dev/bus/usb/007/002, has the permissions root:root 660, while it should have the permissions root:lp 660. The rule for my scanner in /lib/udev/rules.d/80-libsane.rules looks also correct.
If I copy the line with the corresponding udev rule from /lib/udev/rules.d/80-libsane.rules to a newly created file /etc/udev/rules.d/99-scanner.rules as mentioned in this thread, the permissions are set correctly to root:lp 660 as expected, and my unprivileged user can access the scanner.
On the first glance I couldn't find a mistake in /lib/udev/rules.d/80-libsane.rules, which is not too different from /lib/udev/rules.d/53-sane.rules in Arch Linux, where I didn't have this problem. So I guess there's somewhere an issue with either this ruleset, with udev or how or when the udev rules are triggered by the rc scripts.
My unprivileged user is in the groups scanner and lp, but the user can't access the scanner and sane-find-scanner doesn't find it while it is listed by lsusb. The problem is that the scanner device in /dev/bus/usb, in my case /dev/bus/usb/007/002, has the permissions root:root 660, while it should have the permissions root:lp 660. The rule for my scanner in /lib/udev/rules.d/80-libsane.rules looks also correct.
If I copy the line with the corresponding udev rule from /lib/udev/rules.d/80-libsane.rules to a newly created file /etc/udev/rules.d/99-scanner.rules as mentioned in this thread, the permissions are set correctly to root:lp 660 as expected, and my unprivileged user can access the scanner.
On the first glance I couldn't find a mistake in /lib/udev/rules.d/80-libsane.rules, which is not too different from /lib/udev/rules.d/53-sane.rules in Arch Linux, where I didn't have this problem. So I guess there's somewhere an issue with either this ruleset, with udev or how or when the udev rules are triggered by the rc scripts.