FS#42723 - [cups] Some printers are not detected.

Attached to Project: Arch Linux
Opened by Olivier (olive) - Sunday, 09 November 2014, 10:25 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 18 April 2015, 07:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I have encountered a problem when some printer are not detected (Pixma MP270 using the gutenprint driver). After having investagated, the problem, it appears to be a permission problem. The problem can be solved by chmoding /usr/lib/cups/backend/usb:

chmod 0700 /usr/lib/cups/backend/usb

This force cups to execute the usb backend as root, which solves all problems. Very strangely this problem is not completely reproducible and seems to appear only with some printers. I have encountered the problem since the usb start using libusb instead of usblp. Because I only have usb printers I cannot really tell what happens with other printers (parallel/serial). But I see that cups does not propose serial/parallel unless the corresponding backends are chmoded 0700.

Additional info:
* package version(s)

2.0.0-2 and 1.7.x

* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 18 April 2015, 07:44 GMT
Reason for closing:  No response
Comment by Andreas Radke (AndyRTR) - Sunday, 09 November 2014, 15:29 GMT
Please check, if  FS#40937  is your problem.
Comment by Olivier (olive) - Sunday, 09 November 2014, 17:05 GMT
Although closely related, I do not think it is exactly the same problem. But the bug report you mention is written in a very confusing way and I am not sure I understand everything. The bug report you mention, mention devises in /dev that are not relevant anymore at least for usb printers. Another related bug is the following: https://bugs.archlinux.org/task/26030

Here is how I understand the situation. In the default archlinux config cupsd is run as root (and I think it is OK). But cupsd run its backends as another user (I think it is nobody or lp) unless the backend has no group or other permission. So if the usb backend is to be run as root it must have 0700 or 0500 permission. This is explained here: http://www.cups.org/documentation.php/man-backend.html (in the permission section) and also here: http://www.cups.org/documentation.php/api-filter.html#PERMISSIONS . What I say for the usb backend is of course valid for other backends too. Now it is well possible that it would be better, for security reason to not run the usb backend as root. But then, we would have to allow it to access some resource it is not currently allowed to access, but I do not know which ones precisely.
Comment by Andreas Radke (AndyRTR) - Wednesday, 12 November 2014, 19:41 GMT
I assume this to be a bad configuration issue. You should try a default cupsd.conf and a generic printer driver if possible.
Comment by Andreas Radke (AndyRTR) - Thursday, 13 November 2014, 16:01 GMT
Check our defaults in cups-files.conf:

# Default user and group for filters/backends/helper programs; this cannot be
# any user or group that resolves to ID 0 for security reasons...
#User daemon
#Group lp

Your solution to access the backend as root is highly insecure and so is no solution. You seem to have broken your setup in a different way.
Comment by Olivier (olive) - Thursday, 13 November 2014, 16:55 GMT
That's what I have. My understanding is that daemon/lp processes are restricted to access some essential resources. Note that it does not appear with all the printers and I am not sure why (maybe only some communication are allowed?). I am clueless on what resources it need to access. The problems never appear if I recompile cups with libusb disabled because then the backend should only access /dev/lp (or /dev/usb/lp) and there is no problems.
Comment by Andreas Radke (AndyRTR) - Thursday, 13 November 2014, 17:10 GMT
Maybe you should raise your question on the cups user mailing list.
Comment by Andreas Radke (AndyRTR) - Sunday, 04 January 2015, 10:56 GMT
Have you found a solution or reported it somewhere upstream? Sounds to me like an upstream bug or user configuration issue.
Comment by Andreas Radke (AndyRTR) - Sunday, 15 February 2015, 19:11 GMT
Please check with latest cups and cups-filters updates.

Loading...