Xsane permission denied

Bug #447299 reported by Howard Bliss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

I am running Ubuntu 9.04 and hplip-3.9.8. (with parallel port enabled). I am also dual booted with XP. I have two possible scanning devices, a HP-1100a all-in-one and a HP PSC 1315 all-in-one. In Ubuntu if I go to Applications>Graphics>Xsane I get an error message "failed to create file: Permission denied". Then I get a "looking for devices" message followed by Xsane showing up and working properly with my HP-1315 (no chance to choose the HP 1100). If I do a sudo xsane I get a warning about running as root. When I go on, the device selection window shows up with both devices. I can choose either one and then Xsane seems to work properly. How do I correct the "failed to create file: Permission denied" problem? The results from hp-check follows.

howard@howard-presario:~$ hp-check

HP Linux Imaging and Printing System (ver. 3.9.8)
Dependency/Version Check Utility ver. 14.3

Copyright (c) 2001-9 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...

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

Basic system information:
Linux howard-presario 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:49:34 UTC 2009 i686 GNU/Linux

Distribution:
ubuntu 9.04

Checking Python version...
OK, version 2.6.2 installed

Checking PyQt 4.x version...
OK, version 4.4.4 installed.

Checking for CUPS...
Status: scheduler is running
Version: 1.3.9
error_log is set to level: warn

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

------------------------------------
| 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...
OK, found.

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

Checking for dependency: CUPS image - CUPS image 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...
OK, found.

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)...
OK, found.

Checking for dependency: PolicyKit - Administrative policy framework...
OK, found.

Checking for dependency: PyQt 4 DBus - DBus Support for PyQt4...
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 libnotify - Python bindings for the libnotify Desktop notifications...
OK, found.

Checking for dependency: Python XML libraries...
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...
OK, found.

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 3.9.8 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=3.9.8

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

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.9.8.36
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=no
hpijs-only-build=no
lite-build=no
udev-acl-rules=no

Current contents of '/var/lib/hp/hplip.state' file:
# hplip.state - HPLIP runtime persistent variables.

[plugin]
installed=0
eula=0

Current contents of '~/.hplip/hplip.conf' file:
[last_used]
printer_name = psc-1310-series
working_dir = .
device_uri = "hp:/par/HP_LaserJet_1100?device=/dev/parport0"

[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[installation]
version = 3.9.8.36
date_time = 10/09/2009 11:16:08

[settings]
systray_messages = 0
systray_visible = 0

[fax]
email_address =
voice_phone =

[refresh]
rate = 30
enable = false
type = 1

[polling]
enable = false
device_list =
interval = 5

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

  Device URI Model
  -------------------------------- -------------------
  hp:/usb/psc_1310_series?serial=C HP psc 1310 series
  N44J1514CO2

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

HP_LaserJet_1100
----------------
Type: Printer
Device URI: hp:/par/HP_LaserJet_1100?device=/dev/parport0
PPD: /etc/cups/ppd/HP_LaserJet_1100.ppd
PPD Description: HP LaserJet 1100, hpcups 3.9.8
Printer status: printer HP_LaserJet_1100 is idle. enabled since Fri 09 Oct 2009 09:33:53 AM EDT
error: Unable to communicate with device (code=12): hp:/par/HP_LaserJet_1100?device=/dev/parport0
error: Device not found
error: Communication status: Failed

psc-1310-series
---------------
Type: Printer
Device URI: hp:/usb/psc_1310_series?serial=CN44J1514CO2
PPD: /etc/cups/ppd/psc-1310-series.ppd
PPD Description: HP PSC 1310 Series, hpcups 3.9.8
Printer status: printer psc-1310-series is idle. enabled since Thu 08 Oct 2009 09:43:34 AM EDT
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/psc_1310_series?serial=CN44J1514CO2' is a Hewlett-Packard psc_1310_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 0x3f11 at 004:002:
    Device URI: hp:/usb/psc_1310_series?serial=CN44J1514CO2
    Device node: /dev/bus/usb/004/002
    Mode: 0660
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/004/002
# owner: lp
# group: lp
user::rw-
user:howard:rw-
group::rw-
mask::rw-
other::---

---------------
| USER GROUPS |
---------------

howard adm dialout cdrom plugdev lpadmin admin sambashare

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

error: 1 error or warning.

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

Done.
howard@howard-presario:~$

Revision history for this message
Howard Bliss (hbbliss) wrote :

I found a suggested fix and tried sudo rm -fr $HOME/.xsane. This apparently removes .sane and the permission denied goes away. I'm only an adventurous user not advanced. Using Applications>Graphics>Xsane now will bring up Xsane without all of the permission denied stuff. However, one mystery left. I don't get the screen that lets me choose between the HP 1100 and the HP 1315, only the HP 1315. If I run sudo xsane then I get both devices recognized and can choose either one and then scan. Apparently the HP 1100 has some permission that only lets it be recognized by root. Any suggestions will be appreciated.

Revision history for this message
Howard Bliss (hbbliss) wrote :

There are files in /home/howard/.sane/xsane that apparently tell Xsane how to set up for scanning. Since I have two scanning devices there are two files, one for each scanner. The usb scanner file has no access restrictions the parallel port scanner file shows no read or no write icons. I did a sudo chown -R :howard /home/howard/.sane/xsane followed by sudo chown -R : howard /dev/parport0. Now if I go to Applications>Graphics>Xsane I get no permission denied warnings and get a page that allows me to choose either scanner. Unfortunately, after a reboot the chown on the /dev/parport0 needs to be rerun. There is probably some way to fix this all permanently, suggestions welcome.

Revision history for this message
Bill (billf) wrote :

Had the same problem as you, until I changed the owner/group to my UID/GID for the .sane and .sane/xsane directories from root. After I did that the permission denied went away.

Are you a member of the "scanner" group?

$ groups
lp wheel audio cdrom video cdrw usb users lpadmin billf plugdev scanner vboxusers wireshark

Why it changes after reboot is probably because of the udev rules.
This is where it is on my system - gentoo

/etc/udev/rules.d/-70-libsane.rules

Hope this helps.........

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.