Problems with user rights to video device

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
Post Reply
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Problems with user rights to video device

Post by ekiboy69 »

Hello,

Is there some program or routine that changes the rights for video devices? After leaving the ZM in mocord mode the program relatively soon stops reading video feed. I find these error messages from the log:

Jul 4 05:56:30 videoserver zmc-d0[17379]: ERR [Failed to open video device /de
v/video0: Permission denied]

If I do
chmod g+rw /dev/v4l/video0
and restart ZM it will start operating again. Anyhow, after a couple of hours the video device is unreadable again.

Is there something running in the Mandrake that might cause the problem by altering the rights for example?
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

I believe the culprit may be devfsd. During the startup proccess devfsd changes the ownership of the video devices to the logged in user. This messes up the permissions that have been set by zmfix. I have modified zmpkg.pl on the livecd to deal with that.
No one else has reported your specific trouble before, so it may be that your configuration has devfsd interfering again at some point. Do you log out of the user account? You might search through /var/log/syslog for some message at the time the recording stops. You might also note what the ownership and permissions are when the system is working correctly, and what they are after the errors begin. You could try turning devfsd off after the system is up and running with "sudo service devfsd off"
Please let us what you find.

Best regards
Ross
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Post by ekiboy69 »

I guess the problem shows up because of Mandrake's automatic permission adjuster during console logon.

One solution that seemed to fix the problem is to edit file /etc/security/console.perms and add permissions for v4l group:
<console> 0666 <v4l> 0666 root.video

Probably 0660 would be enough, but we wanted to get it working right away...
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Oh, I did log out...

Post by ekiboy69 »

I forgot to mention that yes, the problem arised when logged out of the session. I think is quite natural: in this case the computer is in premises where the people normally working there are not allowed to have access to the ZM computer.

I think this is not extraordinary - therefore it is good that this phenomenon is now documented. If one does not do the trick above ZM dies at the latest when cron does it's job at next full hour when the user has logged out.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Thank you much for digging this out. There will be an updated LiveCD soon with several new features for machines running in "server mode" so this bug would have been a nuisance.

Ross
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Glad to contribute!

Post by ekiboy69 »

Ross,

You are most welcome! You have done a wonderful job with LiveCD. Therefore I am glad to help and contribute. Actually behind my nickname speaks a team of 2 chaps. My skilled co-worker Janne actually solved the problem and reported it.

Summa summarum: this project belongs to the absolute top class among Open Source!
Post Reply