Page 1 of 1

ERR [Can't shmget: Permission denied]

Posted: Thu May 13, 2004 5:28 pm
by johnpaul76
Hi,

I had a version of zoneminder (.9) running. Recently my system changed and I installed 1.19.3. Zoneminder starts and will record, but the preview and setup for the zones returns broken pictures.

/var/log/messages has this error when you go to the preview page.

May 13 13:21:00 linux-udp233863uds zmu[4612]: ERR [Can't shmget: Permission denied]

What is strange is that I can play back recorded events, but not look at the live image.

Any ideas?

Posted: Thu May 13, 2004 8:07 pm
by cordel

Posted: Thu May 13, 2004 8:23 pm
by johnpaul76
I increased shmall and shmmax to 1,134,217,728 (just to be sure.) But the problem is still there.

The capture is working properly.

May 13 16:21:43 linux-udp233863uds zmc-d0[5276]: INF [back: 4000 - Capturing at 20.00 fps]

The problem I have is "permission denied" and not "invalid argument."

Posted: Thu May 13, 2004 9:40 pm
by zoneminder
If you do an 'ipcs -m' you should see all your shared memory segments. These segments need to be readable by 'apache' or whoever your web server user is. This is the same user that normally starts ZM but if you have started ZM as root then this can occur. Depending on your distro people have very occasionally reported that they need to change the default permissions of 700 to 777 in zm_monitor.cpp though this would then open a (minor) security hole to other users on your machine.

Phil,

Posted: Fri May 14, 2004 12:11 am
by cordel
Maybe a really dumb question but why not give it permisions 744 or 740?
Would this still make it a security issue?
Cordel

Posted: Fri May 14, 2004 3:22 pm
by johnpaul76
It turns out I had changed the user the webserver ran under. I changed it back and now everything is fine.

Thanks for your help