-   Linux - Hardware (
-   -   Slackware 12.2 + udev + usb printer permissions (

antitu 02-08-2009 06:29 PM

Slackware 12.2 + udev + usb printer permissions
Howdy all,

The specs:

Slackware 12.2, custom built kernel (
HP PSC 1209 USB AiO printer (Bus 002 Device 004: ID 03f0:2f11 Hewlett-Packard PSC 1200)
Using udev and CUPS for printer control


When powering on/plugging in the printer, the permissions for the device are not following those in /lib/udev/rules.d/55-hpmud.rules:

ls /dev/bus/usb/002/ -l
crw-rw-r-- 1 root root 189, 128 2009-02-08 07:20 001
crw-rw-r-- 1 root root 189, 129 2009-02-08 07:20 002
crw-rw-r-- 1 root root 189, 130 2009-02-08 07:20 003
crw-rw-r-- 1 root root 189, 136 2009-02-08 16:03 004 <-- USB Printer

ls /dev/usb/lp0 -l
crw-rw---- 1 root lp 180, 0 2009-02-08 16:03 /dev/usb/lp0

Setup the printer in CUPS and hplip. Root can access the hp-toolbox, but users cannot. User in question is a member of lp, plugdev, scanner and just about every other group someone has mentioned when dealing with udev printer issues. Still a no go.

If I change the mask on the printer device with:

chmod 0666 /dev/bus/usb/002/004

then the user(s) can access the device and hp-toolbox works.

What I've tried:

* Removed udev, rule files and reinstalled via the package for 12.2

* Removed hplip and reinstalled via the package for 12.2

* Removed hplip and downloaded the latest source tarball. Rebuilt it following their instructions.

* Tried changing the AiO line in 55-hpmud.rules to:
# Check for AiO products (0x03f0xx11).
SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="??11", OWNER="lp", GROUP="lp", MODE="0666", ENV{sane_hpaio}="yes"

* Checked kernel config and removed the deprecated CONFIG_USB_DEVICE_CLASS, rebuilt, rebooted. (Saw that in another Linux forum)

* With and without the above kernel option, tried commenting out from 50-udev-default.rules:
# libusb device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
(Again, saw that suggestion on another Linux forum. Currently, the line is uncommented in the rules file.)

No matter what I do, the /dev/usb/lp0 device has the permissions set properly, but the /dev/bus/usb/002/004 does not.




Didier Spaier 02-09-2009 11:40 AM

Hello Adam,

If you upgraded from 12.1, you should erase the old rules in /etc/udev/rules.d as they can conflict with the new ones in /lib/udev/rules.d

On a clean 12.2 install you should have only 70-persistent-cd.rules and 70-persistent-net.rules in /etc/udev/rules.d

PS rule of thumb: in case of a problem and if you use a custom kernel, try to reproduce it using a kernel included in the distribution -- preferably generic-2.6.27-7smp for Slackware 12.2. You only need to add an entry in lilo.conf to do that.

antitu 02-10-2009 12:04 AM

Re: Slackware 12.2 + udev + usb printer permissions (SOLVED)
First, thanks Didier Spaier for your reply. You put the light on what was causing the problem.

VirtualBox installed a udev rule file in /etc/udev/rules.d. I didn't think much of it until the notion of a conflict was mentioned. Seems that was the culprit.

File - /etc/udev/rules.d/60-vboxdrv.rules

SUBSYSTEM=="usb_device", GROUP="root", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="root", MODE="0664"

Since I don't use USB devices with any of my VMs, these lines were commented out from the file and all is good.

/dev/bus/usb/002/004 = crw-rw---- root lp, just as it should be.

Thanks again!


Didier Spaier 02-10-2009 10:51 AM

I am happy that my wrong hypothesis did drive you to a right conclusion ;)

By the way, in case you did not notice it, SlackbBuilds for VirtualBox 2.1.2 have been recently released @


All times are GMT -5. The time now is 11:06 AM.