FS#26030 - [cups][libusb][hplip] CUPS permissions problem
Attached to Project:
Arch Linux
Opened by Konstantin Gribov (gross) - Thursday, 15 September 2011, 17:40 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 19 May 2012, 19:39 GMT
Opened by Konstantin Gribov (gross) - Thursday, 15 September 2011, 17:40 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 19 May 2012, 19:39 GMT
|
Details
Description:
On CUPS updated to 1.5.0-1 local HP LaserJet 1300 (plugged by usb) stopped working. I deleted printer and tried to config it from scratch. CUPS ever doesn't see it in its web interface (with and without usblp module loaded into kernel). hp-toolbox (from hplip) sees a printer and can add it to /etc/cups/printers.conf. But either in this situation printer fails to print with error like this: D [15/Sep/2011:18:38:21 +0400] [Job 26] STATE: +connecting-to-device D [15/Sep/2011:18:38:21 +0400] [Job 26] libusb couldn't open USB device /dev/bus/usb/007/004: Permission denied. D [15/Sep/2011:18:38:21 +0400] [Job 26] libusb requires write access to USB device nodes. D [15/Sep/2011:18:38:21 +0400] [Job 26] prnt/backend/hp.c 745: ERROR: open device failed stat=12: hp:/usb/hp_LaserJet_1300?serial=00CNCP048715 D [15/Sep/2011:18:38:21 +0400] [Job 26] Wrote 1 pages... D [15/Sep/2011:18:38:21 +0400] [Job 26] Backend returned status 1 (failed) D [15/Sep/2011:18:38:21 +0400] [Job 26] Printer stopped due to backend errors; please consult the error_log file for details. D [15/Sep/2011:18:38:21 +0400] [Job 26] End of messages Corresponding device owned by root:lp, perms: 0664, group lp in cupsd.conf SystemGroup. With 0660 permissions (as recomended on archwiki) it doesn't works too. As a workaroud I added udev rule to set perms 0666, so printer works. But such solution is ugly. Additional info: extra/cups 1.5.0-1 core/libusb 1.0.8-1 extra/hplip 3.11.7-1 |
This task depends upon
I'm in lp group, root is too. Not under root, nor normal user (in lp group) I have no permissions to print something. It looks like dropping permission by cupsd.
EDIT: OK, so this was a problem on my end. I had added lp to the SystemGroup, which is not a good idea and I noticed the problem in the error_log, finally. Yes, I also noticed that this is documented properly in the Appendix on the wiki. So I don't know what the problem might for others.
I'm experiencing the first symptom described which is that of my usb printers are not being detected by cups when I try to add the printers.
I installed TurboPrint, and TurboPrint was able to detect my Canon printer and install drivers for it. Next, I experienced the second symptom: I cannot print as I get the permission denied error, in my case, to /dev/usb/lp1. The device file is owned by root and part of lp group. I can only print after setting permissions to 666.
I haven't found much regarding the second symptom, but for the first symptom, I found the follow bugs reported:
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/883169
This appears to be a problem in with a combination of kernel and cups version. This following comment reports that USB printer detection works with kernel 3.0.0-13 or newer and cups 1.5.0-11 or newer: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/883169/comments/18. The bug is marked as fixed.
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/564917. This bug seem to have been resolved by the above.
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/436495. It looks like blacklisting usblp is not a good idea.
@John Luebs, so how did you fix your problem? By removing lp from "# Administrator user group..." in cupsd.conf? This KDE wiki guide actually suggests the user to add it: https://wiki.archlinux.org/index.php/Kde#Printing
Edit: John, you are indeed correct. Removing "lp" from the Administrator user group allowed cups to print without any permission issues. I wonder why? The other effect of this is that my user can no longer administer cups. What is the correct approach to this?
EDIT: Ah, so not only does it look like the KDE wiki page is giving "bad" advice, so is the Cups wiki page (though the "Appendix" section "Alternative CUPS Interfaces" is OK).