[Bug 862986] New: Incorrect file permissions on /usr/lib/cups/backend/usb in cups
https://bugzilla.novell.com/show_bug.cgi?id=862986 https://bugzilla.novell.com/show_bug.cgi?id=862986#c0 Summary: Incorrect file permissions on /usr/lib/cups/backend/usb in cups Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: All OS/Version: openSUSE 13.1 Status: NEW Severity: Normal Priority: P5 - None Component: Printing AssignedTo: jsmeix@suse.com ReportedBy: jburton@jedi98.co.uk QAContact: jsmeix@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 When cups is installed or updated from rpm the permission on file /usr/lib/cups/backend/usb is set to 555 however the usb cups backend will not find printers or use an existing printer if the permission is not set to 777. The lpd & ipp backends from the same package have the correct permissions. As far as I can recall this has been a bug since at least openSUSE 11.x. Reproducible: Always Steps to Reproduce: 1. Install or update cups package using yast (or zypper) 2. Restart cups service 3. ls -l /usr/lib/cups/backend/usb Actual Results: USB printers will not work # ls -l /usr/lib/cups/backend/usb -r-xr-xr-x 1 root root 35624 Jan 14 15:33 /usr/lib/cups/backend/usb (File permissions = 555) Expected Results: USB printers work correctly # ls -l /usr/lib/cups/backend/usb -rwx------ 1 root root 35624 Jan 14 15:33 /usr/lib/cups/backend/usb (File permissions = 700) This can be worked around by doing: - # chmod 700 /usr/lib/cups/backend/usb following install or update of CUPS, however you usually don't notice that it needs doing until a user says "Can't seem to print" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=862986 https://bugzilla.novell.com/show_bug.cgi?id=862986#c1 --- Comment #1 from Jeremy Burton <jburton@jedi98.co.uk> 2014-02-09 17:45:46 UTC --- Cups version currently "cups-1.5.4-12.4.1.x86_64" however this has been there for a lot of versions. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=862986 https://bugzilla.novell.com/show_bug.cgi?id=862986#c2 --- Comment #2 from Jeremy Burton <jburton@jedi98.co.uk> 2014-02-09 18:07:24 UTC --- The permission problem seems to exist in the cups source installation (cups-1.5.4-source.tar.bz2) and is propagating into the rpm package but I do not know if it causes the usb backend to fail on other distros. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=862986 https://bugzilla.novell.com/show_bug.cgi?id=862986#c3 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Found By|--- |Community User Resolution| |INVALID --- Comment #3 from Johannes Meixner <jsmeix@suse.com> 2014-02-11 11:37:30 CET --- The correct intentional default setting is -r-xr-xr-x root root /usr/lib/cups/backend/usb so that the issue is "invalid" according to https://bugzilla.novell.com/page.cgi?id=fields.html#status "The problem described is not a bug." With -rwx------ root root /usr/lib/cups/backend/usb it is run as "root". We will not have this as default. See "man 7 backend": ------------------------------------------------------------------------ PERMISSIONS Backends without world execute permissions are run as the root user. Otherwise, the backend is run using the unprivileged user account, typically "lp". ------------------------------------------------------------------------ To make USB printers accessible as user "lp", udev should set appropriate device file permissions, for example on my system: ------------------------------------------------------------------------ # lsusb Bus 001 Device 003: ID 03f0:0417 Hewlett-Packard LaserJet 1200 series # lsusb -v -s 001:003 | grep Class bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer # ls -l /dev/bus/usb/001/003 crw-rw-r--+ 1 root lp 189, 2 Feb 7 16:58 /dev/bus/usb/001/003 ------------------------------------------------------------------------ By default USB devices that have an USB Interface class "7 Printer" and an USB Interface SubClass "1 Printer" should get device file permissions set by udev so that "lp" has read and write access via the udev rules in /usr/lib/udev/rules.d/50-udev-default.rules in particular that rule therein (one line shown wrapped here): ------------------------------------------------------------------------ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp" ------------------------------------------------------------------------ In ENV{ID_USB_INTERFACES}=="*:0701??:*" the "0701" matches bInterfaceClass = 07 and bInterfaceSubClass = 01 (see my "lsusb -v -s 001:003 | grep Class" output above). If the udev magic does not work for your USB printer device, you need an appropriate udev rule for your particular device. If only trusted users work on your computer, you can work around those issue by running the CUPS backend as "root" (as you did). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com