I know that the best way to do this is with VMs, but I have some PSTN hardware constraints that would prevent Asterisk from working properly on a VM.
I also know that the next best way to do this is with separate hardware, but that's not an option due to our space and heat dissipation ability at this location, as well as not being economical. This server is replacing another server that has been chugging along for four years with ZM and Asterisk/FreePBX working in harmony.
With all of that out of the way, I have ZoneMinder and Asterisk playing nice. My Apache user/group is "asterisk" and that's what ZM is running on as well.
However, whenever I reboot, the user/group ownership of the sock and temp directories in /var/lib/zoneminder are inexplicably reset to apache:apache. The ZoneMinder service will not start until I chown -R those back to asterisk:asterisk, but after I do that it works fine. Before that, I get the following:
Code: Select all
Sep 28 09:12:55 localhost.localdomain zmdc[1597]: FAT [Can't bind to /var/lib/zoneminder/sock/zmdc.sock: Permission denied]
Sep 28 09:13:03 localhost.localdomain zmdc[1593]: FAT [Can't connect: No such file or directory]
Sep 28 09:13:03 localhost.localdomain zmpkg[1581]: ERR [Unable to run "/usr/bin/zmdc.pl startup", output is "Starting server"]
Sep 28 09:13:03 localhost.localdomain systemd[1]: zoneminder.service: control process exited, code=exited status=255
Sep 28 09:13:03 localhost.localdomain systemd[1]: Failed to start ZoneMinder CCTV recording and security system.
Sep 28 09:13:03 localhost.localdomain systemd[1]: Unit zoneminder.service entered failed state.
Sep 28 09:13:03 localhost.localdomain systemd[1]: zoneminder.service failed.
My /etc/zm/zm.conf files has ZM_WEB_USER and ZM_WEB_GROUP set to asterisk. Am I missing somewhere else that I need to make that change?