Gentoo Forums
Gentoo Forums
Quick Search: in
Digikam permission problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
znerd
n00b
n00b


Joined: 05 May 2004
Posts: 10
Location: Netherlands

PostPosted: Tue Apr 26, 2005 7:28 pm    Post subject: Digikam permission problem Reply with quote

I have a weird problem. When I start Digikam as a normal user, I cannot access my camera. Then when I login as root, I can.

This is the error I get:
"Failed to connect to camera. Please make sure its connected properly and turned on. Would you like to try again?"

I tried debugging with strace but I did not seem to get a lot of useful info. I did see some "Resource unavailable" errors and some time-outs, but I'm not sure they're related.

Background info:
- Linux 2.6.11;
- emerged world with ACCEPT_KEYWORDS=~x86 yesterday morning (do it almost every day);
- Digikam 0.7.2 on KDE 3.4.0;

This is the section in my /proc/bus/usb/devices:

T: Bus=05 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1
P: Vendor=04a9 ProdID=3074 Rev= 0.01
S: Manufacturer=Canon Inc.
S: Product=Canon Digital Camera
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=96ms

$ ls -l /dev/usb
total 0
crw-rw---- 1 root lp 180, 0 Jan 1 1970 lp0

I would expect to see something for my camera there as well?

This is my system name:

$ uname -a
Linux whisperer 2.6.11-gentoo-r4 #3 SMP Sat Mar 26 20:26:12 CET 2005 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux


Then this is the result of emerge info:

$ emerge info
Portage 2.0.51.20-r4 (default-linux/x86/2005.0, gcc-3.3.4, glibc-2.3.5-r0, 2.6.11-gentoo-r4 i686)
=================================================================
System uname: 2.6.11-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.11
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python: 2.3.5
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils: 2.15.92.0.2-r8
sys-devel/libtool: 1.5.14
virtual/os-headers: 2.6.11
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/"
LINGUAS="en nl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl debug directfb divx4linux dvd dvdr emboss encode esd fam fbdev flac foomaticdb fortran gdbm gif gphoto2 gpm gtk2 imagemagick imlib java javamail jpeg junit kde kdeenablefinal libg++ libwww live mad mikmod mmx motif mozilla moznocompose moznoirc moznomail mp3 mpeg nas ncurses network nls ogg oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline rtc slang speex spell sse ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts usb vorbis xine xinerama xml xml2 xmms xv zlib linguas_en linguas_nl"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

Possible causes:
- this may have to do with a recent upgrade I did, via emerge;
- it seems related to devfs (no, I'm not switching to udev yet);

Any ideas?
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Silicon Valley

PostPosted: Wed Apr 27, 2005 6:09 am    Post subject: Reply with quote

Sounds like permissions issues on the /dev node. Check the usb node for the camera and modify it accordingly (ie 0777 or something similar).

Unplug your camera, replug it and check dmesg. If your camera was detected it will display the node it mapped the camera to.
_________________
Got FreeBSD?
Back to top
View user's profile Send private message
znerd
n00b
n00b


Joined: 05 May 2004
Posts: 10
Location: Netherlands

PostPosted: Wed Apr 27, 2005 7:03 pm    Post subject: Which /dev entry? Reply with quote

This is what shows up in my dmesg:
Code:
usb 5-2: new full speed USB device using uhci_hcd and address 2
usb 5-2: USB disconnect, address 2

So how can I tell which device node that is?

Actually, I think that no device node is created under /dev, because I did the following

1) find /dev > ~/d1
2) plug the camera in
3) wait until dmesg shows the camera is connected
4) find /dev > ~/d2
5) diff -u ~/d1 ~/d2

Result: No differences... :-(

But then I don't know how it is possible that root can access the camera...
Back to top
View user's profile Send private message
pesche
n00b
n00b


Joined: 08 Feb 2005
Posts: 21
Location: Berne, Switzerland

PostPosted: Wed May 18, 2005 2:10 pm    Post subject: Reply with quote

If your using your camera in PTP mode have a look at this thread http://forums.gentoo.org/viewtopic-p-2420056.html#2420056
I had the same problem with my camera using the original script in /etc/hotplug/usb.

Greetings,
Pesche.
_________________
"The significant problems we have cannot be solved at the same level of thinking with which we created them."

Albert Einstein (1879 - 1955)
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1542
Location: U.S.A.

PostPosted: Thu Jul 14, 2005 1:43 am    Post subject: Reply with quote

It's the stupid PAM. Seems like every other month or so it screws up my camera for user.
Going to have to look further into doing away with PAM off my box.
_________________
http://webpages.charter.net/decibelshelp/
Don't assume malice for what stupidity can explain.
Always remember you're unique. Just like everyone else.
Everybody lies........but it doesn't matter since nobody listens.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Jul 14, 2005 2:36 am    Post subject: Reply with quote

Decibels wrote:
It's the stupid PAM. Seems like every other month or so it screws up my camera for user.
Going to have to look further into doing away with PAM off my box.

I removed PAM ages ago and not a single problem.

For seting permissions for USB devices accessed through libusb, look here http://forums.gentoo.org/viewtopic-t-355784-highlight-.html
Back to top
View user's profile Send private message
Bendt
n00b
n00b


Joined: 14 Jul 2005
Posts: 15
Location: Denmark

PostPosted: Thu Jul 14, 2005 9:23 pm    Post subject: Reply with quote

After trying the things recomended in this thread, without succes, I simply added myself to the usb-group in /etc/group - that did the trick. But I wonder if I screwed up something else??
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Jul 14, 2005 11:04 pm    Post subject: Reply with quote

Bendt wrote:
After trying the things recomended in this thread, without succes, I simply added myself to the usb-group in /etc/group - that did the trick. But I wonder if I screwed up something else??

That means that the steps in all the links provided above were already done for you, you just needed the last bit.
Since everyone may have different versions of packages, its hard to say which devices are out of the box ready, and which aren't.
Back to top
View user's profile Send private message
j_c_p
Apprentice
Apprentice


Joined: 30 Aug 2003
Posts: 278
Location: France - Colmar

PostPosted: Thu Jul 14, 2005 11:14 pm    Post subject: Reply with quote

The answer of this thread was done in the following topic thread by evoweiss (works well for me) : http://forums.gentoo.org/viewtopic-t-357214-highlight-digikam.html?sid=a0608b41436ec3942cb325d33d9d1947

Quote:
Posted: Sun Jul 10, 2005 2:32 pm Post subject: Reply with quote
Hi all,

Well, I finally got around to trying the solution that I thought would work and, lo and behold, it did work.

So, here is the quick and easy way to do it:

First, copy the version of the usbcam script that is based on a camera group into the /etc/hotplug/usb directory. Gphoto should provide this:


Code:

cp /usr/share/doc/libgphoto2-2.1.5/linux-hotplug/usbcam.group /etc/hotplug/usb/usbcam



Next, create the camera group:


Code:

groupadd camera



Finally, use whatever text editor you like to add your user to the camera group in /etc/group.

After that log out and log back in. The camera should be up and working again for the users in the camera group.

If anybody wants me to post the actual script, just let me know, but, as I said, you should have it if you emerged gphoto2.

Best,

Alex

_________________
Lian Li PC60 - AMD Phenom II X6 1100T BE - Gigabyte GA-MA790X-UD4 - MSI 260GTX+ - M-Audio Delta Audiophile 24/96
Kernel 3.1.10 KDE 4.8.0 GCC 4.5.3 x86_64 01/29/2012
Back to top
View user's profile Send private message
bedo
n00b
n00b


Joined: 11 May 2004
Posts: 56

PostPosted: Sat Jul 16, 2005 9:49 am    Post subject: Reply with quote

quick note:

it's better to use gpasswd to add user to group
Code:

gpasswd -a username groupname


in gnome you need to log out and then log in to use the new group
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1542
Location: U.S.A.

PostPosted: Thu Jul 28, 2005 12:00 am    Post subject: Reply with quote

Headrush wrote:
Decibels wrote:
It's the stupid PAM. Seems like every other month or so it screws up my camera for user.
Going to have to look further into doing away with PAM off my box.

I removed PAM ages ago and not a single problem.

For seting permissions for USB devices accessed through libusb, look here http://forums.gentoo.org/viewtopic-t-355784-highlight-.html


Removed PAM today, followed the Gentoo wiki: http://gentoo-wiki.com/HOWTO_Remove_PAM
and worked great. No problem with the camera either, connected right up to it as user. I'm removing PAM
on all the boxes I administer for other people. Tired of dealing with login and device permissions that are
all traced back to PAM.
_________________
http://webpages.charter.net/decibelshelp/
Don't assume malice for what stupidity can explain.
Always remember you're unique. Just like everyone else.
Everybody lies........but it doesn't matter since nobody listens.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum