LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-08-2009, 06:29 PM   #1
antitu
LQ Newbie
 
Registered: Apr 2007
Location: San Diego
Distribution: Slackware
Posts: 21

Rep: Reputation: 0
Slackware 12.2 + udev + usb printer permissions


Howdy all,

The specs:

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

Problem:

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.

Suggestions?

Thanks!

-Adam
 
Old 02-09-2009, 11:40 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,061

Rep: Reputation: Disabled
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.

Last edited by Didier Spaier; 02-09-2009 at 11:46 AM.
 
Old 02-10-2009, 12:04 AM   #3
antitu
LQ Newbie
 
Registered: Apr 2007
Location: San Diego
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
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!

-Adam
 
Old 02-10-2009, 10:51 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,061

Rep: Reputation: Disabled
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 @ slackbuilds.org.

Cheers,
 
  


Reply

Tags
permissions, udev, usb, virtualbox



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
udev usb permissions socrbird Linux - Hardware 3 05-09-2008 04:54 PM
udev[17514]: run_program: exec of program failed with USB Epson printer Rod Butcher Linux - General 10 06-10-2007 09:35 AM
permissions problem in slackware with usb mouse Krisis Linux - Laptop and Netbook 4 04-13-2007 09:25 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
Slackware 10.1 + Udev Permissions and USB Drives rignes Slackware 3 03-07-2005 09:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration