permissions issue

Asked by martin

After upgrading hplip, cups, and foomatic, I can no longer print to my Photosmart C3180. The printer is detected fine, but after submitting a print job, I get these messages every 30 seconds (and no print):

Sep 28 13:29:03 hosta Photosmart_C3100_series?serial=CN6ANCB0HB04KV: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted
Sep 28 13:29:03 hosta Photosmart_C3100_series?serial=CN6ANCB0HB04KV: io/hpmud/musb.c 603: invalid product id string ret=-1
Sep 28 13:29:03 hosta Photosmart_C3100_series?serial=CN6ANCB0HB04KV: io/hpmud/musb.c 1058: unable to open hp:/usb/Photosmart_C3100_series?serial=CN6ANCB0HB04KV
Sep 28 13:29:04 hosta Photosmart_C3100_series?serial=CN6ANCB0HB04KV: prnt/backend/hp.c 675: INFO: open device failed; will retry in 30 seconds...

The messages are coming from this process:

lp 6519 0.0 0.0 2832 1024 ? S 13:11 0:00 hp:/usb/Photosmart_C3100_series?serial=CN6ANCB0HB04KV 231 root tmp3qPf73 1 media=Letter sides=one-sided finishings=3 number-up=1 job-uuid=urn:uuid:f3abdfb9-2b08-3219-7fa6-a07400364990

When I trace the process, I can see where the breakdown occurs:

hosta # strace -s 255 -fp 6519
Process 6519 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = 0
open("/proc/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 6
fstat64(6, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(6, /* 8 entries */, 4096) = 132
getdents(6, /* 0 entries */, 4096) = 0
close(6) = 0
open("/proc/bus/usb/005", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 6
fstat64(6, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
getdents(6, /* 3 entries */, 4096) = 48
open("/proc/bus/usb/005/001", O_RDWR) = -1 EACCES (Permission denied)
...

You can see that the /proc/bus/usb/005/001 file is owned by root:usb, and is mode 664:

hosta # ls -l /proc/bus/usb/005/001
-rw-rw-r-- 1 root usb 43 Sep 27 03:10 /proc/bus/usb/005/001

And that the lp user is a member of the usb group, so should have no problem opening that file read/write:

hosta # id lp
uid=4(lp) gid=7(lp) groups=7(lp),85(usb),407(scanner)

I have gone as far as to reboot the box, and yet the process still reports permission denied. Clearly the lp user can open that file read/write:

hosta root # su lp
lp@hosta /root $ id
uid=4(lp) gid=7(lp) groups=7(lp),85(usb),407(scanner)
lp@hosta /root $ python
Python 2.5.2 (r252:60911, Sep 1 2008, 04:12:43)
[GCC 4.1.2 (Gentoo 4.1.2 p1.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> open("/proc/bus/usb/005/001", "rw")
<open file '/proc/bus/usb/005/001', mode 'rw' at 0xb7c40530>

So why is this not working? Does the hplip process somehow try to open the file with explicit group membership?

Any help is appreciated!
Martin

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#1

What distro are you using? Please run hp-check -t and post the output.

Thanks!

Aaron

Revision history for this message
martin (hplip-mcgreal) said :
#2

The distro is Gentoo. I set up the printer using hp-setup, selecting the C3100 series PPD.

# hp-check -t

HP Linux Imaging and Printing System (ver. 2.8.7)
Dependency/Version Check Utility ver. 14.0

Copyright (c) 2001-8 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz
or .run) to determine if the proper dependencies are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or
an already built HPLIP supplied tarball has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases
(both compile- and run-time dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait... warning: Invalid ppd_dir value: None

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux hosta 2.6.25-gentoo-r7genesis #1 PREEMPT Thu Sep 4 02:04:55 CDT 2008 i686 AMD Athlon(TM) XP AuthenticAMD GNU/Linux

Distribution:
gentoo 0.0

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.5.2 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
OK, Version 4.7.3 installed

Checking for CUPS... Status: scheduler is running Version: 1.3.8
error_log is set to level: info
note: For troubleshooting printing issues, it is best to have the CUPS 'LogLevel'
note: set to 'debug'. To set the LogLevel to debug, edit the file /etc/cups/cupsd.conf (as root),
note: and change the line near the top of the file that begins with 'LogLevel' to read:
note: LogLevel debug
note: Save the file and then restart CUPS (see your OS/distro docs on how to restart CUPS).
note: Now, when you print, helpful debug information will be saved to the file:
note: /var/log/cups/error_log
note: You can monitor this file by running this command in a console/shell:
note: tail -f /var/log/cups/error_log

Checking for dbus/python-dbus... dbus daemon is running.
python-dbus version: 0.82.4

------------------------------------
| COMPILE AND RUNTIME DEPENDENCIES |
------------------------------------

note: To check for compile-time only dependencies, re-run hp-check with the -c parameter (ie, hp-check -c).
note: To check for run-time only dependencies, re-run hp-check with the -r parameter (ie, hp-check -r).

Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-ddk - CUPS driver development kit...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.

Checking for dependency: cups-devel- Common Unix Printing System development files...
OK, found.

Checking for dependency: dbus - Message bus system...
OK, found.

Checking for dependency: gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
OK, found.

Checking for dependency: libjpeg - JPEG library...
OK, found.

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
OK, found.

Checking for dependency: libusb - USB library...
OK, found.

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.

Checking for dependency: ppdev - Parallel port support kernel module....
error: NOT FOUND! This is a REQUIRED/RUNTIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.

Checking for dependency: PyQt - Qt interface for Python...
OK, found.

Checking for dependency: python-ctypes - A foreign function library for Python...
OK, found.

Checking for dependency: python-dbus - Python bindings for dbus...
OK, found.

Checking for dependency: python-devel - Python development files...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 2.8.7 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=2.8.7

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-2.8.7
icon=/usr/share/applications
cupsbackend=/usr/libexec/cups/backend
cupsfilter=/usr/libexec/cups/filter
drv=/usr/share/cups/drv/hp

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=no
dbus-build=yes
cups11-build=no
doc-build=no
shadow-build=no
foomatic-drv-install=no
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
internal-tag=2.8.7.3
restricted-build=no

--------------------------
| DISCOVERED USB DEVICES |
--------------------------
                                                                                                                   Device URI Model
  --------------------------------------------- --------------------------
  hp:/usb/Photosmart_C3100_series?serial=CN6ANC HP Photosmart C3100 series
  B0HB04KV

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

Photosmart_C3100
----------------
Type: Printer
Installed in HPLIP?: Yes, using the hp: CUPS backend.
Device URI: hp:/usb/Photosmart_C3100_series?serial=CN6ANCB0HB04KV
PPD: /etc/cups/ppd/Photosmart_C3100.ppd
PPD Description: HP Photosmart c3100 series Foomatic/hpijs, hpijs 2.8.7.3 Printer status: printer Photosmart_C3100 is idle. enabled since Sun Sep 28 19:09:11 2008
Communication status: Good

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'... device `hpaio:/usb/Photosmart_C3100_series?serial=CN6ANCB0HB04KV' is a Hewlett-Packard Photosmart_C3100_series all-in-one

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.

-----------------
| USB I/O SETUP |
-----------------

Checking for permissions of USB attached printers...
HP Device 0x5611 at 004:003:
    Device URI: hp:/usb/Photosmart_C3100_series?serial=CN6ANCB0HB04KV
    Device node: /dev/bus/usb/004/003
    Mode: 0664 getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/004/003
# owner: root
# group: scanner
user::rw-
group::rw-
other::r--

-----------
| SUMMARY |
-----------

error: 5 errors and/or warnings.

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html

Done.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#3

Martin,

Other users have been looking for the Gentoo Permissions problem. You can see this thread for some possible information:

https://answers.launchpad.net/hplip/+question/30264

As of right now I don't have any other answer. We don't actively test on Gentoo because of the huge number of variations that can be generated because of the different levels of customization. If you do happen to find a resolution please post it so that we can better assist Gentoo users in the future.

Thanks for your sorry for HPLIP and sorry for the inconvenience.

Aaron

Can you help with this problem?

Provide an answer of your own, or ask martin for more information if necessary.

To post a message you must log in.