Bug 429000 - USB printer port with wrong ownership/permissions
Summary: USB printer port with wrong ownership/permissions
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: rawhide
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: David Zeuthen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-16 18:23 UTC by Horst H. von Brand
Modified: 2013-03-06 03:54 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-02-26 14:24:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Output of lshal (104.11 KB, text/plain)
2008-02-25 16:32 UTC, Horst H. von Brand
no flags Details
lsusb output (264 bytes, text/plain)
2008-02-26 14:02 UTC, Horst H. von Brand
no flags Details
lshal output (104.11 KB, text/plain)
2008-02-26 14:03 UTC, Horst H. von Brand
no flags Details
getfacl /dev/bus/usb/001/* output (201 bytes, text/plain)
2008-02-26 14:03 UTC, Horst H. von Brand
no flags Details

Description Horst H. von Brand 2008-01-16 18:23:05 UTC
Description of problem:
Again, on boot I get:

  crw-r--r-- 1 root root ... /dev/bus/usb/001/004  # USB printer here

I need to:

  chgrp lp /dev/bus/usb/001/004
  chmod g+rw /dev/bus/usb/001/004
  service cups restart

to be able to print

Version-Release number of selected component (if applicable):
udev-118-1.fc9

How reproducible:
Always (booted twice)

Steps to Reproduce:
1. Boot
2. Check permissions on USB port with printer
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tim Waugh 2008-01-19 18:41:40 UTC
Immediately after plugging in the printer, what does 'getfacl' say on the device
node?  The 'ls -l' output you gave looks correct (that's how a correctly
configured device node will look for 'ls -l'), but does not include enough
information to say whether or not the ACL permissions are correct.

Comment 2 Horst H. von Brand 2008-01-25 19:22:33 UTC
The printer is plugged in all time.

[vonbrand@quelen ~]$ getfacl /dev/bus/usb/001/004 
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/004
# owner: root
# group: root
user::rw-
group::r--
other::r--

(yes, I had to fix permissions yet again after booting yesterday)

Comment 3 Tim Waugh 2008-01-29 10:02:07 UTC
But I want to see what they are immediately after the node is created, before
you fix anything.

Comment 4 Horst H. von Brand 2008-01-31 22:26:14 UTC
That is what they are on reboot!

Comment 5 Tim Waugh 2008-02-05 14:48:41 UTC
What does 'lsusb' say when the printer is plugged in and switched on?

Comment 6 Horst H. von Brand 2008-02-08 21:44:00 UTC
# getfacl /dev/bus/usb/001/004
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/004
# owner: root
# group: root
user::rw-
group::r--
other::r--

# lsusb
Bus 001 Device 004: ID 03f0:3817 Hewlett-Packard LaserJet P2015 Series
Bus 001 Device 001: ID 0000:0000  
Bus 002 Device 003: ID 1241:1177 Belkin F8E842-DL Mouse
Bus 002 Device 002: ID 0a81:0101 Chesen Electronics Corp. Keyboard
Bus 002 Device 001: ID 0000:0000

Comment 7 Tim Waugh 2008-02-11 15:56:00 UTC
Hmm, this works as expected here.

1. What does 'rpm -q hal' say?
2. Can you please attach the output of 'lshal'?

Thanks.

Comment 8 Horst H. von Brand 2008-02-11 22:03:04 UTC
# rpm -q hal
hal-0.5.10-4.fc9.x86_64
# lshal
error: dbus_bus_get: org.freedesktop.DBus.Error.FileNotFound: Failed to connect
to socket /var/run/dbus/system_bus_socket: No such file or directory

Comment 9 Horst H. von Brand 2008-02-11 22:04:15 UTC
# service haldaemon status
hald is stopped
# service haldaemon start
Starting HAL daemon:                                       [FAILED]


Comment 10 Horst H. von Brand 2008-02-21 18:04:10 UTC
Hum... just noticed that service messagebus was not enabled. Starting that one I
can start avahi-daemon and the haldaemon.

Rebooting with messagebus enabled gives:

# getfacl /dev/bus/usb/001/004
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/004
# owner: root
# group: root
user::rw-
group::r--
group:lp:rw-
mask::rw-
other::r--

and printing works!

Sorry for the mess.

Comment 11 Horst H. von Brand 2008-02-25 16:29:18 UTC
It is back today! I checked, messagebus, avahi-daemon and haldaemon are all running.

Comment 12 Horst H. von Brand 2008-02-25 16:32:11 UTC
Created attachment 295810 [details]
Output of lshal

hal-0.5.10-5.fc9.x86_64

Comment 13 Horst H. von Brand 2008-02-25 16:40:39 UTC
Just checked the output of lshal, there the printer shows up as 001/005, when it
definitely is at 001/004. Changing ownership/permission of the last one and
restarting cups allows me to print.

Comment 14 Tim Waugh 2008-02-25 17:29:25 UTC
So I need to see three bits of information all at once:

1. lsusb, to see which xxx/yyy number is correct
2. lshal, to see that the correct attributes are set
3. getfacl /dev/bus/usb/xxx/yyy, to see the ACLs


Comment 15 Horst H. von Brand 2008-02-26 14:02:24 UTC
Created attachment 295908 [details]
lsusb output

Comment 16 Horst H. von Brand 2008-02-26 14:03:08 UTC
Created attachment 295910 [details]
lshal output

Comment 17 Horst H. von Brand 2008-02-26 14:03:51 UTC
Created attachment 295911 [details]
getfacl /dev/bus/usb/001/* output

Comment 18 Horst H. von Brand 2008-02-26 14:04:40 UTC
Note that I changed ownership/permissions on 001/004 by hand.

Comment 19 Horst H. von Brand 2008-02-26 14:13:00 UTC
Weird... tried again to make sure.

Clean reboot, printer is now at 001/004. messagebus, avahi-daemon, haldaemon all
active. Printing works.

I swear it did not work before!

Comment 20 Tim Waugh 2008-02-26 14:24:44 UTC
If it recurs, please attach the information requested *without* changing any
permissions.


Note You need to log in before you can comment on or make changes to this bug.