I believe what I'm about to describe has to do with systemd.
Everything below is with selinux disabled as zoneminder and selinux don't get along at all.
After much finagling, I have zoneminder willing to come up and I can hit it from a web browser.
I want it to save its files to a 4TB drive. So, I mount (via fstab) a 4TB drive @ /var/lib/zoneminder.
The drive mounts fine and Apache puts a temp directory there, but prior to the mount, the zoneminder directory was owned by apache.apache. After the mount it is owned by root.root for some reason. So, I chown it back to apache.apache, bounce the box and that mount point is still owned by apache.apache. However, zoneminder won't come up.
If I remove the drive from fstab and bounce the box, zoneminder comes up. If I have the drive as part of fstab it won't. The actual failure is recorded as:
root@airportserver lib# systemctl status zoneminder.service
zoneminder.service - Video security and surveillance system
Loaded: loaded (/usr/lib/systemd/system/zoneminder.service; enabled)
Active: failed (Result: exit-code) since Mon 2013-09-16 13:16:00 CST; 19s ago
Process: 2212 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)
Sep 16 13:15:49 airportserver.private.ycc systemd[1]: Starting Video security and surveillance system...
Sep 16 13:15:50 airportserver.private.ycc zmpkg[2212]: INF [Command: start]
Sep 16 13:15:50 airportserver.private.ycc su[2222]: (to root) root on (null)
Sep 16 13:15:50 airportserver.private.ycc su[2231]: (to root) root on (null)
Sep 16 13:15:50 airportserver.private.ycc su[2237]: (to root) root on (null)
Sep 16 13:15:50 airportserver.private.ycc su[2243]: (to root) root on (null)
Sep 16 13:16:00 airportserver.private.ycc zmpkg[2212]: ERR [Unable to run "su apache --shell=/bin/sh --command='/usr/bin/zmdc.pl star...rver"]
Sep 16 13:16:00 airportserver.private.ycc systemd[1]: zoneminder.service: control process exited, code=exited status=255
Sep 16 13:16:00 airportserver.private.ycc systemd[1]: Failed to start Video security and surveillance system.
Sep 16 13:16:00 airportserver.private.ycc systemd[1]: Unit zoneminder.service entered failed state.
root@airportserver lib# su apache --shell=/bin/sh --command='/usr/bin/zmdc.pl startup'
The failure doesn't appear to have anything to do with the drive mount, but it has to be responsible because if I remove the drive and boot everything is fine.
How can a drive mount cause this? With selinux out of the way, what besides normal rights can have such an effect? Does systemD use any of the selinux directory properties as part of its operations even when selinux is disabled?


Reply With Quote
