| Author |
Message |
|
Drakeweb
Joined: Fri Apr 06, 2007 8:15 pm Posts: 15
|
 Must CHMOD 777 every time to get cameras working
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
|
| Fri Apr 06, 2007 8:37 pm |
|
|
|
 |
|
zoneminder
Site Admin
Joined: Wed Jul 09, 2003 3:07 pm Posts: 5221 Location: Bristol, UK
|
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.
_________________ Phil
|
| Sat Apr 07, 2007 8:26 pm |
|
 |
|
Drakeweb
Joined: Fri Apr 06, 2007 8:15 pm Posts: 15
|
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!
|
| Sat Apr 07, 2007 8:32 pm |
|
 |
|
zoneminder
Site Admin
Joined: Wed Jul 09, 2003 3:07 pm Posts: 5221 Location: Bristol, UK
|
The zmfix binary should be setuid, that is when you do it should look like this and show an 's' instead of an 'x' in the first block of permissions. What do you get if you do that?
_________________ Phil
|
| Sat Apr 07, 2007 8:37 pm |
|
 |
|
Drakeweb
Joined: Fri Apr 06, 2007 8:15 pm Posts: 15
|
Hmmm, mine is as you thought:
So how do I go about changing it, and will it make a difference?
|
| Sat Apr 07, 2007 10:21 pm |
|
 |
|
cordel
Joined: Fri Mar 05, 2004 5:47 pm Posts: 5218 Location: /USA/Washington/Seattle
|
|
| Sat Apr 07, 2007 10:42 pm |
|
 |
|
Drakeweb
Joined: Fri Apr 06, 2007 8:15 pm Posts: 15
|
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
|
| Sun Apr 08, 2007 9:25 am |
|
 |
|
cordel
Joined: Fri Mar 05, 2004 5:47 pm Posts: 5218 Location: /USA/Washington/Seattle
|
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.
|
| Sun Apr 08, 2007 9:32 am |
|
 |
|
barbaq
Joined: Mon Dec 19, 2005 11:42 pm Posts: 5
|
 Problem solved.
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.
|
| Mon Apr 23, 2007 12:17 am |
|
 |
|
John Williams
Joined: Wed Apr 11, 2007 2:27 pm Posts: 23 Location: Austin, Texas USA
|
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...
_________________ -----------
John
|
| Fri Apr 27, 2007 6:59 pm |
|
 |
|
cyrulution
Joined: Sat Jul 28, 2007 1:27 pm Posts: 52 Location: Kinzweiler, Germany and Beith, Scotland
|
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.
_________________ Serenity is not freedom from storm; it's peace within the storm
|
| Wed Jan 28, 2009 9:40 pm |
|
 |
|
nuck
Joined: Tue Nov 11, 2008 2:43 am Posts: 145 Location: Canada
|
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.
|
| Wed Feb 04, 2009 7:54 am |
|
 |
|
cyrulution
Joined: Sat Jul 28, 2007 1:27 pm Posts: 52 Location: Kinzweiler, Germany and Beith, Scotland
|
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.
_________________ Serenity is not freedom from storm; it's peace within the storm
|
| Wed Feb 04, 2009 8:05 pm |
|
|