ERR [Can't shmget: Permission denied]

Support and queries relating to all previous versions of ZoneMinder
Locked
johnpaul76
Posts: 20
Joined: Mon Nov 10, 2003 4:05 pm

ERR [Can't shmget: Permission denied]

Post 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?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

johnpaul76
Posts: 20
Joined: Mon Nov 10, 2003 4:05 pm

Post 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."
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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,
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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
johnpaul76
Posts: 20
Joined: Mon Nov 10, 2003 4:05 pm

Post 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
Locked