/dev/video0 permission problem

Bug #488455 reported by wierdlmate@gmail.com
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
xawtv (Ubuntu)
New
Low
Unassigned

Bug Description

Binary package hint: udev

I can use my webcamera only as root, though the device's permissions seem fine.

$ xawtv -c /dev/video0
This is xawtv-3.95.dfsg.1, running on Linux/x86_64 (2.6.31-15-generic)
xinerama 0: 1680x1050+0+0
WARNING: No DGA direct video mode for this display.
/dev/video0 [v4l2]: no overlay support
v4l-conf had some trouble, trying to continue anyway
v4l2: open /dev/video0: Engedély megtagadva
v4l2: open /dev/video0: Engedély megtagadva
v4l: open /dev/video0: Engedély megtagadva
no video grabber device available

(Engedély megtagadva = Permission denied)

But I have

$ ls -l /dev/video0
crw-rw-rw-+ 1 root video 81, 0 2009-11-25 13:45 /dev/video0
$ whoami
apu
$ grep video /etc/group
video:x:44:dori,marci,apu

The camera works fine with the command

sudo xawtv -c /dev/video0

ProblemType: Bug
Architecture: amd64
CustomUdevRuleFiles: 50-udev.rules
Date: Wed Nov 25 15:30:36 2009
DistroRelease: Ubuntu 9.10
MachineType: Gateway SX2800
Package: udev 147~-6.1
ProcCmdLine: root=UUID=2401a021-7e19-4b1d-bef4-8ec3e790671e ro quiet splash
ProcEnviron:
 PATH=(custom, no user)
 LANG=hu_HU.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: udev
Uname: Linux 2.6.31-15-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:5490): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:5490): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:5588): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:5583): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
dmi.bios.date: 05/26/2009
dmi.bios.vendor: AMI
dmi.bios.version: P01-A3
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: WG43M
dmi.board.vendor: Gateway
dmi.chassis.type: 3
dmi.chassis.vendor: Gateway
dmi.modalias: dmi:bvnAMI:bvrP01-A3:bd05/26/2009:svnGateway:pnSX2800:pvr:rvnGateway:rnWG43M:rvr:cvnGateway:ct3:cvr:
dmi.product.name: SX2800
dmi.sys.vendor: Gateway

Revision history for this message
wierdlmate@gmail.com (wierdlmate) wrote :
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

If the permissions are 666, and xawtv is returning Permission Denied, the problem must be something else

Changed in udev (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
status: Incomplete → Invalid
status: Invalid → New
affects: udev (Ubuntu) → xawtv (Ubuntu)
Revision history for this message
wierdlmate@gmail.com (wierdlmate) wrote :

Yes, the problem is that

$ ls -l /dev/shm/usb-0000\:00\:1a.1-2\:USB\ Camera\ \(046d\:08da\)
-rw------- 1 root root 4096 2009-12-02 01:14 /dev/shm/usb-0000:00:1a.1-2:USB Camera (046d:08da)

I got this from another bugreport (I think debian). Where these permissions are set, I have no idea---I certainly couldn't see anything in /etc/udev. Even if I change it to 666, it changes back to 600 after reboot. That bugreport claimed that the problem was fixed back in August. Why this is a problem of low importance is not clear to me. I think the problem affects everybody on a 64 bit box trying to use skype because the permissions are probably set by the v4l1 compatibility package.

Revision history for this message
Paul Brossier (piem) wrote :

Hi,

I confirm this bug on Karmic with the pac207, and I guess this bug should be reassigned from xawtv to libv4l, as explained in http://bugs.debian.org/542204 . A patch is available in this report.

Here the /dev/shm/usb-* file is created with the owner and group of the first use who started the camera, so that the camera works only for this user, until the next reboot.

Cheers, piem

Revision history for this message
wierdlmate@gmail.com (wierdlmate) wrote :

Actually, I think the owner of the /dev/shm/usb-* file is always root.root. Look

$ ls -l /dev/shm/usb-*
ls: /dev/shm/usb-* nem érhető el: Nincs ilyen fájl vagy könyvtár
$ whoami
apu

plug in camera

$ ls -l /dev/shm/usb-*
-rw------- 1 root root 4096 2009-12-06 22:07 /dev/shm/usb-0000:00:1a.1-2:USB Camera (046d:08da)

Is the debian patch you mentioned available for 64 bit boxes as well? (B/c the debian bug page you refer to lists only i386 packages.

Anyho, thx for looking into this.

Revision history for this message
Paul Brossier (piem) wrote :

Have you tried if changing the ownership of this file fixes it?

$ sudo chown apu.apu /dev/shm/usb-*
$ xawtv

This patch should also work on a 64 bits box. The package was uploaded for i386, then compiled by Debian machines for all other architectures.

Revision history for this message
wierdlmate@gmail.com (wierdlmate) wrote :

Yeah fixing both the ownership (to root.video) and the permissions (to 660) fix the problem. Until the camera gets unplugged and plugged back in because then a new /dev/shm file gets created. So would installing the debian package on an ubuntu box work?

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.