/dev/video0 device permission problem

Support and queries relating to all previous versions of ZoneMinder
Locked
rrk
Posts: 22
Joined: Sat Mar 11, 2006 10:17 pm

/dev/video0 device permission problem

Post by rrk »

zm does not have permission to use /dev/video0
from the system log
zmdc log shows video0 crashing on a regular basis

current ownership of /dev/video0 is root and video
i have added www-data to the video group zmuser is not a system user should it be?
zm 1.23 from debian pkg

rob
rrk
Posts: 22
Joined: Sat Mar 11, 2006 10:17 pm

Post by rrk »

which user from with in zmc is accessing /dev/video0
making zmuser a system user does not fix the problem
rob
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

The permissions aren't as obvious as you'd think . . there's a program /usr/bin/zmfix which should get the perms right (when run as root). Alternately the brute-force "sudo chmod 777 /dev/video0" will get things working :-)
rrk
Posts: 22
Joined: Sat Mar 11, 2006 10:17 pm

Post by rrk »

thanks that worked I was trying to avoid the 777 club/stick
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

Then suid the zm-fix xcript.
jorloujr
Posts: 4
Joined: Tue May 13, 2008 5:01 pm

Post by jorloujr »

Me too am facing the same problem, brute force chmod 666/dev/video0 does works, but zmfix do not ...

Any hints ?

I,m on Ubuntu 8.04, ZM installed from Synaptic.
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

jorloujr wrote:Me too am facing the same problem, brute force chmod 666/dev/video0 does works, but zmfix do not ...

Any hints ?

I,m on Ubuntu 8.04, ZM installed from Synaptic.
zmfix needs to be run with root permissions to change things. So you either do Lee's trick of suid-ing the script, or you run "sudo zmfix".

PJH
jorloujr
Posts: 4
Joined: Tue May 13, 2008 5:01 pm

Post by jorloujr »

PeterHoward wrote:zmfix needs to be run with root permissions ...
Thanks Peter !

I found

http://www.zoneminder.com/wiki/index.php/Ubuntu_7.04

and

sudo chmod 4755 /usr/bin/zmfix

worked fine. Silly me ...
Locked