Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Multimedia & Video
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Multimedia & Video
Have multimedia question? ATI, Nvidia, Sound cards. Just ask here.

 
Thread Tools Display Modes
Old February 17th, 2008   #1
jakommo
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 32
Ubuntu 9.04 Jaunty Jackalope
[SOLVED] quickcam permission problem

Hi,

I have a Quickcam Express installed using qc-usb-source and qc-usb-utils
the cam is working but the problem is that /dev/video0 belongs to root:root and I want it to have root:users or something like that. I've checked udev rules but there is nothing about it.
so the question is which program is making the device and setting the permissions?
or do I have to write my own udev rule for the cam?

any help appreciated

regards

jakommo

Last edited by jakommo; February 17th, 2008 at 04:31 PM..
jakommo is offline   Reply With Quote
Old February 17th, 2008   #2
sisco311
Ubuntu Pale Lager
 
sisco311's Avatar
 
Join Date: Feb 2007
Location: romania
My beans are hidden!
Ubuntu Development Release
Re: quickcam permission problem

please post the output of
Code:
cat  /etc/udev/rules.d/40-permissions.rules
sisco311 is offline   Reply With Quote
Old February 18th, 2008   #3
jakommo
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 32
Ubuntu 9.04 Jaunty Jackalope
Re: quickcam permission problem

Hi sisco311,

here ist the output. I did some changes on the GROUP because I need them to work for all users of the group "users".

Code:
root@point71:/etc/udev/rules.d# cat 40-permissions.rules
# This file establishes permissions and ownership of devices according
# to Ubuntu policy.  See udev(7) for syntax.
#
# The names of the devices must not be set here, but in 20-names.rules;
# user-friendly symlinks (which need no permissions or ownership) should
# be set in 60-symlinks.rules.

# Block devices
SUBSYSTEM!="block", GOTO="block_end"
ATTRS{removable}!="1",                  GROUP="disk"
ATTRS{removable}=="1",                  GROUP="floppy"
SUBSYSTEMS=="usb",                      GROUP="users"
SUBSYSTEMS=="ieee1394",                 GROUP="users"
SUBSYSTEMS=="mmc",                      GROUP="users"
SUBSYSTEMS=="pcmcia",                   GROUP="users"
LABEL="block_end"

# IDE devices
ENV{ID_CDROM}=="?*",                    GROUP="cdrom"
KERNEL=="ht[0-9]*",                     GROUP="tape"
KERNEL=="nht[0-9]*",                    GROUP="tape"

# IEEE1394 (firewire) devices
# Please note that raw1394 gives unrestricted, raw access to every single
# device on the bus and those devices may do anything as root on your system.
# Yes, I know it also happens to be the only way to rewind your users camera,
# but it's not going to be group "users", okay?
KERNEL=="raw1394",                      GROUP="disk"
KERNEL=="dv1394*",                      GROUP="users"
KERNEL=="users1394*",                   GROUP="users"

# Packet CD devices, group under /dev/pktcdvd
KERNEL=="pktcdvd",                      MODE="0644"
KERNEL=="pktcdvd[0-9]*",                GROUP="cdrom"

# Printers and Parallel devices
SUBSYSTEM=="printer",                   GROUP="lp"
SUBSYSTEM=="ppdev",                     GROUP="lp"
SUBSYSTEM=="usb", KERNEL=="lp[0-9]*",   GROUP="lp"
KERNEL=="pt[0-9]*",                     GROUP="tape"
KERNEL=="pht[0-9]*",                    GROUP="tape"

# SCSI devices
SUBSYSTEMS=="scsi", GOTO="scsi_start"
GOTO="scsi_end"
LABEL="scsi_start"
ATTRS{type}=="1",                       GROUP="tape"
ATTRS{type}=="5",                       GROUP="cdrom"
ATTRS{type}=="6",                       GROUP="scanner"
ATTRS{type}=="8",                       GROUP="tape"
ATTRS{type}=="3", ATTRS{vendor}=="HP",  GROUP="scanner"
ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
LABEL="scsi_end"

# Serial devices
SUBSYSTEM=="tty",                       GROUP="dialout"
SUBSYSTEM=="capi",                      GROUP="dialout"
SUBSYSTEM=="slamr",                     GROUP="dialout"
SUBSYSTEM=="zaptel",                    GROUP="dialout"
KERNEL=="ttyLTM[0-9]*",                 GROUP="dialout", MODE="0660"

# Sound devices
SUBSYSTEM=="sound",                     GROUP="users"

# USB devices (usbfs replacement)
SUBSYSTEM=="usb_device",                MODE="0664"

# vc (virtual console) devices
SUBSYSTEM!="tty", GOTO="vc_end"
KERNEL=="console",                      GROUP="root", MODE="0600"
KERNEL=="ptmx",                         GROUP="root", MODE="0666"
KERNEL=="pty*",                         GROUP="tty", MODE="0666"
KERNEL=="tty",                          GROUP="root", MODE="0666"
KERNEL=="tty[0-9]*",                    GROUP="root"
KERNEL=="vcs*",                         GROUP="root"
LABEL="vc_end"

# Video devices
SUBSYSTEM=="drm",                       GROUP="users"
SUBSYSTEM=="dvb",                       GROUP="users"
SUBSYSTEM=="graphics",                  GROUP="users"
SUBSYSTEM=="users4linux",               GROUP="users"
KERNEL=="agpgart",                      GROUP="users"
KERNEL=="nvidia*",                      GROUP="users"

# Other devices, by name
KERNEL=="null",                         MODE="0666"
KERNEL=="zero",                         MODE="0666"
KERNEL=="full",                         MODE="0666"
KERNEL=="random",                       MODE="0666"
KERNEL=="urandom",                      MODE="0666"
KERNEL=="mem",                          GROUP="kmem", MODE="0640"
KERNEL=="kmem",                         GROUP="kmem", MODE="0640"
KERNEL=="port",                         GROUP="kmem", MODE="0640"
KERNEL=="nvram",                        GROUP="nvram"
KERNEL=="rtc",                          GROUP="users"
KERNEL=="inotify",                      MODE="0666"
KERNEL=="js[0-9]*",                     GROUP="users"
root@point71:/etc/udev/rules.d#
regards jakommo
jakommo is offline   Reply With Quote
Old February 18th, 2008   #4
sisco311
Ubuntu Pale Lager
 
sisco311's Avatar
 
Join Date: Feb 2007
Location: romania
My beans are hidden!
Ubuntu Development Release
Re: quickcam permission problem

ok. edit two lines:

Code:
 root@point71:/etc/udev/rules.d# cat 40-permissions.rules
# This file establishes permissions and ownership of devices according
# to Ubuntu policy.  See udev(7) for syntax.
#
# The names of the devices must not be set here, but in 20-names.rules;
# user-friendly symlinks (which need no permissions or ownership) should
# be set in 60-symlinks.rules.

# Block devices
SUBSYSTEM!="block", GOTO="block_end"
ATTRS{removable}!="1",                  GROUP="disk"
ATTRS{removable}=="1",                  GROUP="floppy"
SUBSYSTEMS=="usb",                      GROUP="users"
SUBSYSTEMS=="ieee1394",                 GROUP="users"
SUBSYSTEMS=="mmc",                      GROUP="users"
SUBSYSTEMS=="pcmcia",                   GROUP="users"
LABEL="block_end"

# IDE devices
ENV{ID_CDROM}=="?*",                    GROUP="cdrom"
KERNEL=="ht[0-9]*",                     GROUP="tape"
KERNEL=="nht[0-9]*",                    GROUP="tape"

# IEEE1394 (firewire) devices
# Please note that raw1394 gives unrestricted, raw access to every single
# device on the bus and those devices may do anything as root on your system.
# Yes, I know it also happens to be the only way to rewind your users camera,
# but it's not going to be group "users", okay?
KERNEL=="raw1394",                      GROUP="disk"
KERNEL=="dv1394*",                      GROUP="users"
 KERNEL=="video1394*",                   GROUP="users"
 
# Packet CD devices, group under /dev/pktcdvd
KERNEL=="pktcdvd",                      MODE="0644"
KERNEL=="pktcdvd[0-9]*",                GROUP="cdrom"

# Printers and Parallel devices
SUBSYSTEM=="printer",                   GROUP="lp"
SUBSYSTEM=="ppdev",                     GROUP="lp"
SUBSYSTEM=="usb", KERNEL=="lp[0-9]*",   GROUP="lp"
KERNEL=="pt[0-9]*",                     GROUP="tape"
KERNEL=="pht[0-9]*",                    GROUP="tape"

# SCSI devices
SUBSYSTEMS=="scsi", GOTO="scsi_start"
GOTO="scsi_end"
LABEL="scsi_start"
ATTRS{type}=="1",                       GROUP="tape"
ATTRS{type}=="5",                       GROUP="cdrom"
ATTRS{type}=="6",                       GROUP="scanner"
ATTRS{type}=="8",                       GROUP="tape"
ATTRS{type}=="3", ATTRS{vendor}=="HP",  GROUP="scanner"
ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
LABEL="scsi_end"

# Serial devices
SUBSYSTEM=="tty",                       GROUP="dialout"
SUBSYSTEM=="capi",                      GROUP="dialout"
SUBSYSTEM=="slamr",                     GROUP="dialout"
SUBSYSTEM=="zaptel",                    GROUP="dialout"
KERNEL=="ttyLTM[0-9]*",                 GROUP="dialout", MODE="0660"

# Sound devices
SUBSYSTEM=="sound",                     GROUP="users"

# USB devices (usbfs replacement)
SUBSYSTEM=="usb_device",                MODE="0664"

# vc (virtual console) devices
SUBSYSTEM!="tty", GOTO="vc_end"
KERNEL=="console",                      GROUP="root", MODE="0600"
KERNEL=="ptmx",                         GROUP="root", MODE="0666"
KERNEL=="pty*",                         GROUP="tty", MODE="0666"
KERNEL=="tty",                          GROUP="root", MODE="0666"
KERNEL=="tty[0-9]*",                    GROUP="root"
KERNEL=="vcs*",                         GROUP="root"
LABEL="vc_end"

# Video devices
SUBSYSTEM=="drm",                       GROUP="users"
SUBSYSTEM=="dvb",                       GROUP="users"
SUBSYSTEM=="graphics",                  GROUP="users"
 SUBSYSTEM=="video4linux",               GROUP="users"
KERNEL=="agpgart",                      GROUP="users"
KERNEL=="nvidia*",                      GROUP="users"

# Other devices, by name
KERNEL=="null",                         MODE="0666"
KERNEL=="zero",                         MODE="0666"
KERNEL=="full",                         MODE="0666"
KERNEL=="random",                       MODE="0666"
KERNEL=="urandom",                      MODE="0666"
KERNEL=="mem",                          GROUP="kmem", MODE="0640"
KERNEL=="kmem",                         GROUP="kmem", MODE="0640"
KERNEL=="port",                         GROUP="kmem", MODE="0640"
KERNEL=="nvram",                        GROUP="nvram"
KERNEL=="rtc",                          GROUP="users"
KERNEL=="inotify",                      MODE="0666"
KERNEL=="js[0-9]*",                     GROUP="users"
sisco311 is offline   Reply With Quote
Old February 18th, 2008   #5
jakommo
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 32
Ubuntu 9.04 Jaunty Jackalope
Re: quickcam permission problem

thanks

I used :%s/video/users/g in vim to change every video to users, and didn't think about that there is the word video in a non GROUP="" field.

thanks again.

greez jakommo
jakommo is offline   Reply With Quote
Old February 18th, 2008   #6
jakommo
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 32
Ubuntu 9.04 Jaunty Jackalope
Re: [SOLVED] quickcam permission problem

Hmm ok added Solved to quick.

I applied the changes and rebooted but its still /dev/video0 root:root.

any other suggestions? or is there a way to see what udev is doing like a log file?
jakommo is offline   Reply With Quote
Old February 18th, 2008   #7
sisco311
Ubuntu Pale Lager
 
sisco311's Avatar
 
Join Date: Feb 2007
Location: romania
My beans are hidden!
Ubuntu Development Release
Re: [SOLVED] quickcam permission problem

the log file is /var/log/udev (post it)
sisco311 is offline   Reply With Quote
Old February 19th, 2008   #8
jakommo
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 32
Ubuntu 9.04 Jaunty Jackalope
Re: [SOLVED] quickcam permission problem

Hi sisco311,

I attached it because its to long to post and had to tar it because of the filesize limit for txt files.
I had a look at the file but couldn't find anything about video0.

thanks for your help.

jakommo
Attached Files
File Type: tar udev.tar (310.0 KB, 11 views)
jakommo is offline   Reply With Quote
Old February 19th, 2008   #9
jakommo
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 32
Ubuntu 9.04 Jaunty Jackalope
Re: [SOLVED] quickcam permission problem

Ok I have another idea, the problem apears on a diskless system, and I only made the changes to the etc ramdisk, and not on the server.
I think bacause udev starts before the etc ramdisk is mounted, it didnt work last time. now I've changed it back, also in the udev rules on the server and I should work.
It will be the first thing I do tomorrow when I'm at work.
jakommo is offline   Reply With Quote
Old February 19th, 2008   #10
sisco311
Ubuntu Pale Lager
 
sisco311's Avatar
 
Join Date: Feb 2007
Location: romania
My beans are hidden!
Ubuntu Development Release
Re: [SOLVED] quickcam permission problem

Hi jakommo,

Good luck and let me know if you have more questions.

sisco311
sisco311 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 05:37 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry