ZoneMinder configuration file found but is not readable.

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
EveningDarkstar
Posts: 19
Joined: Tue Sep 10, 2019 11:08 pm

ZoneMinder configuration file found but is not readable.

Post by EveningDarkstar »

Hello - I am getting a head scratcher of a problem when attempting to start up the Zoneminder v1.36.15-lp153.72.1 daemon (zm.service) on my OpenSuSE 15.3 x64 system. It is failing with the following stack walk-back of error messages -

022-05-14T20:23:41.371435-07:00 nova zmpkg.pl[18169]: WARNING: ZoneMinder configuration file found but is not readable. Check file permissions on /etc/zoneminder/zm.conf
2022-05-14T20:23:41.371488-07:00 nova zmpkg.pl[18169]: Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Database.pm line 81.
2022-05-14T20:23:41.371507-07:00 nova zmpkg.pl[18169]: Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Database.pm line 91.
2022-05-14T20:23:41.371528-07:00 nova zmpkg.pl[18169]: Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Database.pm line 110.
2022-05-14T20:23:41.378115-07:00 nova zmpkg.pl[18169]: DBD::mysql::st execute failed: No database selected at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Config.pm line 97.
2022-05-14T20:23:41.378254-07:00 nova zmpkg.pl[18169]: Can't execute: No database selected at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Config.pm line 257.
2022-05-14T20:23:41.378279-07:00 nova zmpkg.pl[18169]: BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Config.pm line 257.
2022-05-14T20:23:41.378295-07:00 nova zmpkg.pl[18169]: Compilation failed in require at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder.pm line 33.
2022-05-14T20:23:41.378321-07:00 nova zmpkg.pl[18169]: BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder.pm line 33.
2022-05-14T20:23:41.378335-07:00 nova zmpkg.pl[18169]: Compilation failed in require at /usr/bin/zmpkg.pl line 34.
2022-05-14T20:23:41.378350-07:00 nova zmpkg.pl[18169]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
2022-05-14T20:23:41.379530-07:00 nova systemd[1]: zm.service: Control process exited, code=exited, status=11/n/a
2022-05-14T20:23:41.379619-07:00 nova systemd[1]: zm.service: Failed with result 'exit-code'.
2022-05-14T20:23:41.379841-07:00 nova systemd[1]: Failed to start ZoneMinder Video Surveillance System.

I have changed both the ownership and permissions of /etc/zoneminder/zm.conf every which way I can think of to solve this permissions issue but no joy! (I have spent hours, if not days fiddling with the permissions!) I am beginning to suspect this is a very misleading error message, so don't really understand why it is failing. I am not running SELINUX nor can I finding anything configured for zoneminder in the apparmor system, so the file permissions problem cannot be coming from either of those two security nuisances. The permissions on /etc/zoneminder/zm.conf is currently set to 0640.

Anyone got any ideas on how to lead me out of these woods? I will be happy to supply any configuration files and/or output from some magical command incantation. Thanks for any help offered in advance, I am stuck!

Marc....
EveningDarkstar
Posts: 19
Joined: Tue Sep 10, 2019 11:08 pm

Re: ZoneMinder configuration file found but is not readable.

Post by EveningDarkstar »

Ping? No thoughts anyone? I am stuck on this error and cannot bring up ZoneMinder! Marc...
mikb
Posts: 585
Joined: Mon Mar 25, 2013 12:34 pm

Re: ZoneMinder configuration file found but is not readable.

Post by mikb »

Post the result of

Code: Select all

ls -lah /etc/zoneminder/zm.conf
Because 0640 is the permissions, but says nothing about ownership. On my setup this file is owned by apache.apache, as it's required for the webserver to read it, not zoneminder.

Code: Select all

-rw------- 1 apache apache 1.4K Feb  9  2013 /usr/local/etc/zm.conf
Post yours, maybe that will trigger someone to say "You're doing it wrong ..." :)
EveningDarkstar
Posts: 19
Joined: Tue Sep 10, 2019 11:08 pm

Re: ZoneMinder configuration file found but is not readable.

Post by EveningDarkstar »

OK, here is the output from the ls command, The Apache2 service runs under the user wwwrun and belongs to the www group

Code: Select all

# ls -lah /etc/zoneminder/zm.conf
-rw-r----- 1 wwwrun www 1.9K May 19 12:51 /etc/zoneminder/zm.conf
Other info that might be useful -

Code: Select all

# groups zm_admin
zm_admin : users www
# groups wwwrun
wwwrun : www root video
# groups root
root : root www
HTHs Marc...
arcingplasma
Posts: 2
Joined: Sun Apr 23, 2023 8:46 am

Re: ZoneMinder configuration file found but is not readable.

Post by arcingplasma »

Was a solution found to this?
I have done a fresh install of Ubuntu (22.04.2) on Windows WSL and am getting the same error.
arcingplasma
Posts: 2
Joined: Sun Apr 23, 2023 8:46 am

Re: ZoneMinder configuration file found but is not readable.

Post by arcingplasma »

Not sure if this will work for everyone but I followed the optional instructions in https://zoneminder.readthedocs.io/en/la ... 2-04-jammy
and also added the extra command
sudo systemctl reload apache2
after the restart command
Post Reply