LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-24-2006, 04:43 PM   #1
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Rep: Reputation: 15
Permission problem with my digital camera in gthumb


Hello
When I try to import my photos in gthumb I receive the message:
Quote:
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
my camera is a nikon coolpix 990.

As root it works fine. Does anybody knows, how I can give the permissions?

Thanks in advance
 
Old 03-24-2006, 05:30 PM   #2
Samoth
Member
 
Registered: Apr 2005
Distribution: Ubuntu dapper(2.6.17.4-custom), Gentoo 2006.1 amd64(2.6.17-r8-custombuild)
Posts: 472
Blog Entries: 1

Rep: Reputation: 30
I actually wish I knew that. I have the same problems in slackware.
 
Old 04-09-2006, 10:21 AM   #3
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
Code:
$ lsusb;ls -l /dev/usb*;ls -l /proc/bus/usb/002
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 004: ID 0781:0621 SanDisk Corp. SDDR-86 Imagemate 6-in-1 Reader
Bus 002 Device 003: ID 05e3:0604 Genesys Logic, Inc.
Bus 002 Device 002: ID 046d:0870 Logitech, Inc. QuickCam Express
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
crw-rw----  1 root root 189,   0 2006-04-09 09:28 /dev/usbdev1.1
crw-rw----  1 root root 189, 128 2006-04-09 09:28 /dev/usbdev2.1
crw-rw----  1 root root 189, 129 2006-04-09 09:28 /dev/usbdev2.2
crw-rw----  1 root root 189, 130 2006-04-09 09:28 /dev/usbdev2.3
crw-rw----  1 root root 189, 131 2006-04-09 09:28 /dev/usbdev2.4
crw-rw----  1 root root 189,   0 2006-04-09 09:28 /dev/usbdev3.1
total 0
-rw-r--r--  1 root root 43 2006-04-09 09:28 001
-rw-r--r--  1 root root 73 2006-04-09 09:28 002
-rw-r--r--  1 root root 43 2006-04-09 09:28 003
-rw-r--r--  1 root root 50 2006-04-09 09:28 004

If I plug in my digital camera and do lsusb I get this:
Code:
$ lsusb;ls -l /dev/usb*;ls -l /proc/bus/usb/002
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 008: ID 040a:0576 Kodak Co. DX4530
Bus 002 Device 004: ID 0781:0621 SanDisk Corp. SDDR-86 Imagemate 6-in-1 Reader
Bus 002 Device 003: ID 05e3:0604 Genesys Logic, Inc.
Bus 002 Device 002: ID 046d:0870 Logitech, Inc. QuickCam Express
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
crw-rw----  1 root root 189,   0 2006-04-09 09:28 /dev/usbdev1.1
crw-rw----  1 root root 189, 128 2006-04-09 09:28 /dev/usbdev2.1
crw-rw----  1 root root 189, 129 2006-04-09 09:28 /dev/usbdev2.2
crw-rw----  1 root root 189, 130 2006-04-09 09:28 /dev/usbdev2.3
crw-rw----  1 root root 189, 131 2006-04-09 09:28 /dev/usbdev2.4
crw-rw----  1 root root 189, 135 2006-04-09 10:01 /dev/usbdev2.8
crw-rw----  1 root root 189,   0 2006-04-09 09:28 /dev/usbdev3.1
total 0
-rw-r--r--  1 root root 43 2006-04-09 09:28 001
-rw-r--r--  1 root root 73 2006-04-09 09:28 002
-rw-r--r--  1 root root 43 2006-04-09 09:28 003
-rw-r--r--  1 root root 50 2006-04-09 09:28 004
-rw-r--r--  1 root root 57 2006-04-09 10:01 008
As you can see the camera caused a device 008 to be created on bus 002. Now if I change the permissions of that device so I have r/w access then I will not get the error you are getting.

As root:
chmod go+w /proc/bus/usb/002/008

Code:
$ ls -l /proc/bus/usb/002
total 0
-rw-r--r--  1 root root 43 2006-04-09 09:28 001
-rw-r--r--  1 root root 73 2006-04-09 09:28 002
-rw-r--r--  1 root root 43 2006-04-09 09:28 003
-rw-r--r--  1 root root 50 2006-04-09 09:28 004
-rw-rw-rw-  1 root root 57 2006-04-09 10:15 008
I'm trying to figure out how to get usbfs to create the device with the correct permissions but havent had any luck so far. Please post if you have any luck.

This is the entry I have in /etc/fstab
usbfs /proc/bus/usb usbfs user,defaults 0 0

<edit> As a quick-fix I run this script when I need access to my camera.
Code:
#!/bin/bash
USBPATH="/proc/bus/usb"
STRING=( `lsusb|grep DX4530|sed 's/://'` )
BUS=${STRING[1]}
DEV=${STRING[3]}
[ ! -f $USBPATH/$BUS/$DEV ] && echo "Could not locate $USBPATH/$BUS/$DEV" && exit 1
echo "Changing permissions for $USBPATH/$BUS/$DEV"
sudo chmod go+w $USBPATH/$BUS/$DEV

Last edited by /bin/bash; 04-09-2006 at 10:57 AM.
 
Old 08-23-2006, 12:02 AM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
Find the script which is mounting usbfs (for slackware it is /etc/rc.d/rc.udev) and make it mount so you have rw permissions:
I modified my /etc/rc.d/rc.udev file like this:
Code:
# Mount usbfs:
if ! grep -wq usbfs /proc/mounts ; then
   if [ -d /proc/bus/usb ]; then
       mount usbfs -t usbfs /proc/bus/usb -o \
       devgid=10,devmode=0664, \
       busgid=10,busmode=775  #<edit> Oops no \ needed here
   fi
fi
NOTE: devgid=10 sets the device Group ID to wheel and my user is a member of wheel group. Also busgid sets the USB BUS directory Group ID to wheel.

<edit> Also you can do this through the /etc/fstab file
usbfs /proc/bus/usb usbfs devgid=10,devmode=0664,busgid=10,busmode=775 0 0

Last edited by /bin/bash; 08-24-2006 at 03:46 AM.
 
  


Reply

Tags
camera, digital, permission, permissions, usb


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My camera, autodetection and GThumb GL1800 Fedora 7 02-08-2006 01:44 PM
Digital camera problem stormtracknole Slackware 8 12-22-2005 10:59 AM
gthumb crashes, when I try to import photos from my nikon camera laurentwahl Linux - Software 3 07-29-2005 02:58 AM
Digital Camera problem yoto Linux - Hardware 1 11-30-2003 05:10 PM
what the problem with my digital camera jeson_515 Linux - Hardware 0 07-30-2003 09:48 PM


All times are GMT -5. The time now is 03:27 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration