Bug 429000 - USB printer port with wrong ownership/permissions
USB printer port with wrong ownership/permissions
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
rawhide
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: David Zeuthen
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-16 13:23 EST by Horst H. von Brand
Modified: 2013-03-05 22:54 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-26 09:24:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Horst H. von Brand 2008-01-16 13:23:05 EST
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 13:41:40 EST
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 14:22:33 EST
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 05:02:07 EST
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 17:26:14 EST
That is what they are on reboot!
Comment 5 Tim Waugh 2008-02-05 09:48:41 EST
What does 'lsusb' say when the printer is plugged in and switched on?
Comment 6 Horst H. von Brand 2008-02-08 16:44:00 EST
# 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 10:56:00 EST
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 17:03:04 EST
# 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 17:04:15 EST
# service haldaemon status
hald is stopped
# service haldaemon start
Starting HAL daemon:                                       [FAILED]
Comment 10 Horst H. von Brand 2008-02-21 13:04:10 EST
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 11:29:18 EST
It is back today! I checked, messagebus, avahi-daemon and haldaemon are all running.
Comment 12 Horst H. von Brand 2008-02-25 11:32:11 EST
Created attachment 295810 [details]
Output of lshal

hal-0.5.10-5.fc9.x86_64
Comment 13 Horst H. von Brand 2008-02-25 11:40:39 EST
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 12:29:25 EST
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 09:02:24 EST
Created attachment 295908 [details]
lsusb output
Comment 16 Horst H. von Brand 2008-02-26 09:03:08 EST
Created attachment 295910 [details]
lshal output
Comment 17 Horst H. von Brand 2008-02-26 09:03:51 EST
Created attachment 295911 [details]
getfacl /dev/bus/usb/001/* output
Comment 18 Horst H. von Brand 2008-02-26 09:04:40 EST
Note that I changed ownership/permissions on 001/004 by hand.
Comment 19 Horst H. von Brand 2008-02-26 09:13:00 EST
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 09:24:44 EST
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.