Hi, I have a little problem here, I think I did something wrong configuring my system. Here's the problem:
ZM works very well in everything but after every reboot it gives me that error:
(from /var/log/messages)
Mar 26 15:38:29 videoserver zm: Starting ZoneMinder:
[...]
Mar 26 15:38:30 videoserver zmfix[1914]: INF [Debug Level = 0, Debug Log = ]
Mar 26 15:38:30 videoserver zmfix[1914]: INF [Resetting permissions on /dev/video0 to 20606]
[...]
Mar 26 15:38:34 videoserver zmc-d0[2107]: INF [Debug Level = 0, Debug Log = ]
Mar 26 15:38:34 videoserver zmc-d0[2107]: ERR [Failed to open video device /dev/video0: Permission denied]
I must go to the console and do "restart" or run zmfix manually to let zmc have access to video0. after that zm works well.
At the moment I did a walkaround by putting a call to zmfix in crontab.
Mar 26 15:40:00 videoserver CROND[2392]: (root) CMD (/usr/local/bin/zmfix)
Mar 26 15:40:00 videoserver zmfix[2392]: INF [Debug Level = 0, Debug Log = ]
Mar 26 15:40:00 videoserver zmfix[2392]: INF [Resetting permissions on /dev/video0 to 20606]
Mar 26 15:40:54 videoserver zmc-d0[2395]: INF [Debug Level = 0, Debug Log = ]
Mar 26 15:40:54 videoserver zmc-d0[2395]: INF [Starting Capture]
Mar 26 15:45:19 videoserver zmc-d0[2395]: INF [New: 1000 - Capturing at 3.77 fps]
The same trick didn't work calling it form /etc/rc.d/rc.local
Can somebody tell me what I am missing?
System: Mandrake10, kernel 2.6.3, bttv 0.9.12 (card=103, insmod), zm 1.19.1
Thx,
Davide
problem with permissions after reboot
Re: problem with permissions after reboot
Hi Davide,
I have noticed this for several versions on both Mandrake 9.9 and 10.0. It happens if you start zm in the init scripts. What I think is happenning is this. zmpkg.pl runs zmfix and get the permissions set correctly. Then as X is starting and autologins a user, devfsd helpfully resets the owner and group of the devices to the logged in user. This would also undo running zmfix from rc.local. In any case here is a hack that has been working well for me. In zmpkg.pl add this line after line 257:
execute( ZM_PATH_BIN."/zmfix -a" );
Hope this helps.
:)
Ross
I have noticed this for several versions on both Mandrake 9.9 and 10.0. It happens if you start zm in the init scripts. What I think is happenning is this. zmpkg.pl runs zmfix and get the permissions set correctly. Then as X is starting and autologins a user, devfsd helpfully resets the owner and group of the devices to the logged in user. This would also undo running zmfix from rc.local. In any case here is a hack that has been working well for me. In zmpkg.pl add this line after line 257:
execute( ZM_PATH_BIN."/zmfix -a" );
Hope this helps.
:)
Ross
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: problem with permissions after reboot
Thanks Ross, you learn something every day!
One thing I would add it that editing zmpkg.pl is fine if you are doing the installed one, if you are changing it in the build directory and then installing you should change zmpkg.pl.z instead as zmpkg.pl is generated from this each time you run zmconfig.pl
Phil,
One thing I would add it that editing zmpkg.pl is fine if you are doing the installed one, if you are changing it in the build directory and then installing you should change zmpkg.pl.z instead as zmpkg.pl is generated from this each time you run zmconfig.pl
Phil,
Re: problem with permissions after reboot
Tanks Ross,
adding that line solved the problem.
Now I remember I had the same problem on mandrake9.2 zm1.17.0 (your live cd).
thank you again!
adding that line solved the problem.
Now I remember I had the same problem on mandrake9.2 zm1.17.0 (your live cd).
thank you again!