Page 1 of 1
Must CHMOD 777 every time to get cameras working
Posted: Fri Apr 06, 2007 7:37 pm
by Drakeweb
When booting my zoneminder server (Ubuntu server) zoneminder starts automatically. Unfortunately, it fails to start the cameras, returning errors (exited abnormally etc.)
My /dev/video already has its permissions set to 777.
If I chmod 777 /dev/video, however, it brings the cameras on-line and stops all the errors.
Obviously, this is a workaround that I can do each time I boot the server, which is not often, but it does seem weird.
Anyone have any explanation, and a possible long-term solution?
Cheers,
Adam
Posted: Sat Apr 07, 2007 7:26 pm
by zoneminder
Is /dev/video a symlink to /dev/video0? If so does that have the correct permissions? The zmfix binary should set the permissions on the devices but may only work if your monitors are set to use the real device files and not links to them.
Posted: Sat Apr 07, 2007 7:32 pm
by Drakeweb
I've changed the cameras to source from /dev/video0 instead of the symlink and the same problem happens. Everything is set to 777, then I reboot, then the cameras stop working and generate errors in the log, then I chmod 777 /dev/video0 and the cameras start working again!
Posted: Sat Apr 07, 2007 7:37 pm
by zoneminder
The zmfix binary should be setuid, that is when you do
it should look like this
Code: Select all
-rwsr-xr-x 1 root root 128011 Apr 3 17:09 /usr/local/bin/zmfix
and show an 's' instead of an 'x' in the first block of permissions. What do you get if you do that?
Posted: Sat Apr 07, 2007 9:21 pm
by Drakeweb
Hmmm, mine is as you thought:
Code: Select all
-rwxr-xr-x 1 root root 38780 2007-02-25 23:44 /usr/bin/zmfix
So how do I go about changing it, and will it make a difference?
Posted: Sat Apr 07, 2007 9:42 pm
by cordel
Posted: Sun Apr 08, 2007 8:25 am
by Drakeweb
Sweet! That seemed to do it. Thanks. I just rebooted having changed the permissions and the cameras came up without a problem.
Could you please explain why that worked? What did it do that made everything ok?
Thanks,
Adam
Posted: Sun Apr 08, 2007 8:32 am
by cordel
It sets a suid flag so even though apache is executing the file, it runs as root (the file user) so that it can set the permissions for the video device.
Problem solved.
Posted: Sun Apr 22, 2007 11:17 pm
by barbaq
Thanks this topic solved my latest issues with Zoneminder. Ive installed it using apt-get with Debian but had to change /usr/bin/zmfix permissions to make it display images.
Posted: Fri Apr 27, 2007 5:59 pm
by John Williams
Another way is to create a group called video and add www_data to it. Ubuntu created the /dev/video device in the video group, which does not exist. Zoneminder runs the capture as user www_data. This fix worked for me...
Posted: Wed Jan 28, 2009 8:40 pm
by cyrulution
John Williams wrote:Another way is to create a group called video and add www_data to it. Ubuntu created the /dev/video device in the video group, which does not exist. Zoneminder runs the capture as user www_data. This fix worked for me...
Ubuntu won't let me create www_data as a user. No understrokes possible.
I still don't have the cameras running.
Just to explain why I install Ubuntu 7.10 now (Jan 2009): I haven't found a way to get the so named "Pico" card working with Ubuntu 8.xx. So I need to use 7.10. I had installed the 2008 ZMLiveCD from isentrix.com. But the display with the blue and red boxes under the picture did not really work. And I'm using Ubuntu on other machines.
Posted: Wed Feb 04, 2009 6:54 am
by nuck
cyrulution wrote:Ubuntu won't let me create www_data as a user. No understrokes possible.
I still don't have the cameras running.
Just to explain why I install Ubuntu 7.10 now (Jan 2009): I haven't found a way to get the so named "Pico" card working with Ubuntu 8.xx. So I need to use 7.10. I had installed the 2008 ZMLiveCD from isentrix.com. But the display with the blue and red boxes under the picture did not really work. And I'm using Ubuntu on other machines.
Does this help you at all?
http://wiki.robotz.com/index.php/Pico_I ... V_DVR_Card (look towards the bottom of the page)
Chances are that if you can get it working at all with an older Linux distro it'll work (maybe better) with newer. Once you've got a working card in Linux ZM should have no problems with it.
Posted: Wed Feb 04, 2009 7:05 pm
by cyrulution
nuck wrote:Does this help you at all?
http://wiki.robotz.com/index.php/Pico_I ... V_DVR_Card (look towards the bottom of the page)
Chances are that if you can get it working at all with an older Linux distro it'll work (maybe better) with newer. Once you've got a working card in Linux ZM should have no problems with it.
The information from robotz is really useful for using my cards.
After all I decided to start from scratch.
I thoroughly followed the steps in distribution specific installation guide from the ZM wiki for Ubuntu 8.04 (I'm running Ubuntu on other machines since years)
I downloaded Ubuntu 8.04 i386 server (the LTS= Long Time Support version of Ubuntu). After i added a file "bttv" with the line
to /etc/modprobe.d/ both my cards started working fine.
I think this is the best solution for my rather modern amd64 machine.