View unanswered posts | View active topics It is currently Tue May 21, 2013 5:48 pm



Reply to topic  [ 13 posts ] 
Must CHMOD 777 every time to get cameras working 
Author Message

Joined: Fri Apr 06, 2007 8:15 pm
Posts: 15
Post 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
Profile
Site Admin
User avatar

Joined: Wed Jul 09, 2003 3:07 pm
Posts: 5221
Location: Bristol, UK
Post 
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
Profile ICQ YIM WWW

Joined: Fri Apr 06, 2007 8:15 pm
Posts: 15
Post 
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
Profile
Site Admin
User avatar

Joined: Wed Jul 09, 2003 3:07 pm
Posts: 5221
Location: Bristol, UK
Post 
The zmfix binary should be setuid, that is when you do
Code:
ls -l zmfix
it should look like this
Code:
-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?

_________________
Phil


Sat Apr 07, 2007 8:37 pm
Profile ICQ YIM WWW

Joined: Fri Apr 06, 2007 8:15 pm
Posts: 15
Post 
Hmmm, mine is as you thought:

Code:
-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?


Sat Apr 07, 2007 10:21 pm
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post 
This will get you set:
Code:
chmod 4755 /usr/bin/zmfix


Sat Apr 07, 2007 10:42 pm
Profile WWW

Joined: Fri Apr 06, 2007 8:15 pm
Posts: 15
Post 
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
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post 
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
Profile WWW

Joined: Mon Dec 19, 2005 11:42 pm
Posts: 5
Post 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
Profile

Joined: Wed Apr 11, 2007 2:27 pm
Posts: 23
Location: Austin, Texas USA
Post 
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
Profile

Joined: Sat Jul 28, 2007 1:27 pm
Posts: 52
Location: Kinzweiler, Germany and Beith, Scotland
Post 
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.

_________________
Serenity is not freedom from storm; it's peace within the storm


Wed Jan 28, 2009 9:40 pm
Profile WWW

Joined: Tue Nov 11, 2008 2:43 am
Posts: 145
Location: Canada
Post 
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.


Wed Feb 04, 2009 7:54 am
Profile

Joined: Sat Jul 28, 2007 1:27 pm
Posts: 52
Location: Kinzweiler, Germany and Beith, Scotland
Post 
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
Code:
options bttv card=77,77
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
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group