LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-29-2004, 03:17 PM   #1
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
Libusb devices only accessable as root


Hey guys... i used to use the kernel scanner driver in kernel 2.4. allowing normal users to access the scanner was as easy as chmod 666 /dev/scanner0.

however now i am using the libusb interface with kernel 2.6 (gt68xx scanner)

ohh, yeah it IS a usb scanner...

anyways... here's the confusing part...

sane-find-scanner detects my scanner if ran as root, or a normal user... however XSANE and KOOKA only detect the scanner if they are run as root..

what do i need to chmod ?
how do i allow all users access to the scanner ?

ive already chmod 777 the scanner firmware.
ive added my user to the /etc/groups sections "usb" and "scanner"

not sure what else to do ? any ideas ? thankyou.
 
Old 09-29-2004, 04:58 PM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
fixed it.... lsusb gave me the address of the usb scanner. then i chmod 666'ed the apropriate /proc/bus/usb files.
 
Old 09-29-2004, 05:11 PM   #3
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
There's a script I use to make the devices in /proc/bus/usb/001 executable. I don't know how Gentoo works, but it should be similar. The script comes with sane-backends. Mine is in /home/sane-backends-1.0.14/tools/hotplug, there's a readme file too.

This is the script:
Code:
#!/bin/sh

# This file is part of sane-backends.
#
# This script changes the permissions and ownership of a USB device under
# /proc/bus/usb to grant access to this device to users in the scanner group.
#
# Ownership is set to root:scanner, permissions are set to 0660.
#
# Arguments :
# -----------
# ACTION=[add|remove]
# DEVICE=/proc/bus/usb/001/BBB/DDD
# TYPE=usb

#if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
#  chown root:scanner "$DEVICE"
#  chmod 0660 "$DEVICE"
#fi


# That's an insecure but simple alternative
# Everyone has access to the scanner

# if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
# chmod 0666 "$DEVICE"
#fi
Just uncomment the part you want to use
 
Old 09-29-2004, 05:15 PM   #4
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
Looks like you beat me to it. But keep in mind that changing the permissions is only temporary - they will be reset to default at the next boot, and you'll need to change them again (the device entries themselves are also renamed). The sane script takes care of it automatically
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No mixer elements and/or devices found. Works only as root! titan_pi8 Linux - Newbie 2 04-30-2005 07:51 AM
Network not accessable dave111 Linux - Networking 5 01-10-2005 08:34 AM
letting non-root users mount devices davey Linux - General 3 12-10-2003 07:09 AM
winxp not accessable wx_jason Linux - Newbie 2 10-06-2003 06:11 AM
how to use my other devices when im not root?? Kjetil4455 Slackware 17 08-02-2003 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration