how-to set group permissions hpaio:/usb/

Asked by Jelle de Jong

I have bought a new all-in-one that connect through usb.

I can only use the scanner as root user through:
hpaio:/usb/Officejet_J5700_series?serial=CN7BOCF3HP04TC

How can I set group permissions for the device, so normal users in the permitted group can use the device?

What system is responsible for setting the permissions?

I am using debian sid.

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Jelle de Jong
Solved:
Last query:
Last reply:
Revision history for this message
John Hosszu (john-hosszu) said :
#1

Good Day

can you post the output to,

$ hp-check -t

Thanks

jh

Revision history for this message
Jelle de Jong (jelledejong) said :
#2

hp-check -t and sudo hp-check -t output
http://filebin.ca/wabrep/debug.txt

How can i add a file to this question?

ls -hal /dev/bus/usb/005/005
crw-rw---- 1 lp scanner 189, 516 Jul 7 21:05 /dev/bus/usb/005/005

sudo adduser $USER scanner

I solved the issue after finding the device node permissions

Revision history for this message
Jelle de Jong (jelledejong) said :
#3

Thanks for the hint John

Revision history for this message
aceqbaceq (aceqbaceq) said :
#4

i had similar problem. hp 1120 mfp. sane works only with root permissions.

i used two files from packet iscan.

first file

/etc/hotplug/iscan-device , permissions = 755, root, root

================
#!/bin/sh

DEFAULT_OWNER=root
DEFAULT_GROUP=root
DEFAULT_PERMS=0666

USB_SCRIPTS="libusbscanner
             usbscanner
             desktopdev
            "
for script in $USB_SCRIPTS; do
    if [ -x $HOTPLUG_DIR/$TYPE/$script ]; then
 exec $HOTPLUG_DIR/$TYPE/$script
    fi
done

# Activate fallback settings
#
if [ "$ACTION" == add -a "$TYPE" == "usb" ]; then
    chown $DEFAULT_OWNER:$DEFAULT_GROUP "$DEVICE"
    chmod $DEFAULT_PERMS "$DEVICE"
fi
=======================

second file

/etc/hotplug/iscan.usermap , permissions = 644, root, root

=========================

# Hewlett-Packard | HP LaserJet M1120 MFP
iscan-device 0x0003 0x03f0 0x5617 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
===================================

in the second file actually important and individual for you is 0x03f0= Vendor_Id and 0x5617=Device_Id.

change it for yours. how determine?
# sane-find-scanner

what it does to me. it changes permissions from 644 to 666 to file

/proc/bus/usb/001/003 - this file concern my scanner. :) and as i have permissions 666 then i can run

$xsane

as user. :)

hope this help.