[SOLVED*] CentOS7, some file permission errors... *workaround

Forum for questions and support relating to the 1.28.x releases only.
Locked
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

[SOLVED*] CentOS7, some file permission errors... *workaround

Post by rockandroller »

Still doing early testing, fresh install.

Seeing these errors in the log

Code: Select all

2016-01-28 14:50:13.604723	web_js	4136	ERR	getStreamCmdResponse stream error: socket_bind( /var/lib/zoneminder/sock/zms-856375w.sock ) failed: Permission denied - checkStreamForErrors()	?view=watch	
2016-01-28 14:50:13.574494	web_php	4136	ERR	socket_bind( /var/lib/zoneminder/sock/zms-856375w.sock ) failed: Permission denied	/usr/share/zoneminder/www/includes/functions.php	2330
2016-01-28 14:50:07.708086	web_js	4136	ERR	Uncaught TypeError: Cannot read property 'delayed' of undefined	http://zonemndr.v.rotech.ca/zm/skins/classic/views/js/watch.js	234
2016-01-28 14:50:03.562313	web_js	4136	ERR	getStreamCmdResponse stream error: socket_bind( /var/lib/zoneminder/sock/zms-856375w.sock ) failed: Permission denied - checkStreamForErrors()	?view=watch	
2016-01-28 14:50:03.529453	web_php	4136	ERR	socket_bind( /var/lib/zoneminder/sock/zms-856375w.sock ) failed: Permission denied	/usr/share/zoneminder/www/includes/functions.php	2330
2016-01-28 14:49:57.970272	zms	10191	ERR	Unable to validate swap image path, disabling buffered playback	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp	3966
2016-01-28 14:49:57.969942	zms	10191	ERR	Can't mkdir /dev/shm/zmswap-m3: Permission denied	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp	3448
2016-01-28 14:49:57.954573	zms	10191	WAR	Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor CAM1	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp	426
2016-01-28 14:34:07.474674	zmc_m3	7937	INF	CAM1: 1000 - Capturing at 0.99 fps	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp	2907
Any suggestions? I'm puzzled...

Tried changing from Monitor to MoDetect, and still get a video stream, but no recording is triggered.

Tried setting it to record... "recorded" for a minute. Shut it off, says there is one event, seventy seconds long. Fine - but clicking on the event brings up an empty video window. (pic icon with X ) I'm guessing something doesn't have correct write permissions?

Latest log events now look like

Code: Select all

2016-01-28 15:13:05.703000	web_js	12240	ERR	getCmdResponse stream error: socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied - checkStreamForErrors()	?view=event	
2016-01-28 15:13:05.674115	web_php	12240	ERR	socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied	/usr/share/zoneminder/www/includes/functions.php	2330
2016-01-28 15:13:04.180378	web_js	12240	ERR	getCmdResponse stream error: socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied - checkStreamForErrors()	?view=event	
2016-01-28 15:13:04.150826	web_php	12240	ERR	socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied	/usr/share/zoneminder/www/includes/functions.php	2330
2016-01-28 15:13:00.177339	web_js	12240	ERR	getCmdResponse stream error: socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied - checkStreamForErrors()	?view=event	
2016-01-28 15:13:00.144194	web_php	12240	ERR	socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied	/usr/share/zoneminder/www/includes/functions.php	2330
2016-01-28 15:12:45.841345	web_js	7709	ERR	getCmdResponse stream error: socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied - checkStreamForErrors()	?view=event	
2016-01-28 15:12:45.817149	web_php	7709	ERR	socket_bind( /var/lib/zoneminder/sock/zms-246763w.sock ) failed: Permission denied	/usr/share/zoneminder/www/includes/functions.php	2330
2016-01-28 15:12:45.523985	zms	12244	ERR	Empty JPEG image (DNL not supported)	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_jpeg.cpp	40
2016-01-28 15:12:45.523755	zms	12244	ERR	Attempt to directly assign buffer with invalid width or height: 0 0	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp	360
2016-01-28 15:12:45.523558	zms	12244	ERR	Attempt to assign image with an empty buffer	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp	467
2016-01-28 15:12:45.523207	zms	12244	ERR	Can't open /usr/share/zoneminder/www/events/3/16/01/28/15/11/22/00001-capture.jpg: Permission denied	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp	669
2016-01-28 15:12:45.507521	zms	12244	WAR	Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor CAM1	/builddir/build/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp	426
2016-01-28 15:12:45.382564	web_js	10913	WAR	Adjusting to minimum height when getting popup size for tag 'event' - getPopupSize()	?view=events	
2016-01-28 15:12:34.007920	zmdc	2885	WAR	Can't find process with command of 'zma -m 3'	zmdc.pl	
2016-01-28 15:12:33.850100	zmdc	2885	WAR	Can't find process with command of 'zmtrack.pl -m 3'	zmdc.pl	
2016-01-28 15:12:33.689170	zmdc	2885	INF	'zmc -m 3' already running at 16/01/28 14:17:14, pid = 7937	zmdc.pl	
Last edited by rockandroller on Fri Jan 29, 2016 12:48 am, edited 2 times in total.
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: CentOS7, some file permission errors...

Post by rockandroller »

OK, getting warmer now...

I thought I had disabled SELINUX!! CentOS7 is all Greek to me, after years of Centos 5/6... :?

Code: Select all

:Jan 28 13:28:37 zonemndr-v-rotech-local python[3052]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                      If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 13:53:40 zonemndr-v-rotech-local setroubleshoot[4242]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 13:53:40 zonemndr-v-rotech-local python[4242]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                      If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 13:53:40 zonemndr-v-rotech-local setroubleshoot[4242]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 13:53:40 zonemndr-v-rotech-local python[4242]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                      If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 13:56:16 zonemndr-v-rotech-local setroubleshoot[4619]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 13:56:16 zonemndr-v-rotech-local python[4619]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                      If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 13:56:16 zonemndr-v-rotech-local setroubleshoot[4619]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 13:56:16 zonemndr-v-rotech-local python[4619]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                      If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:17:20 zonemndr-v-rotech-local setroubleshoot[7900]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 14:17:20 zonemndr-v-rotech-local python[7900]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                      If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:17:21 zonemndr-v-rotech-local setroubleshoot[7900]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 14:17:21 zonemndr-v-rotech-local python[7900]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                      If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:26:08 zonemndr-v-rotech-local setroubleshoot[8479]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 14:26:08 zonemndr-v-rotech-local python[8479]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                      If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:26:08 zonemndr-v-rotech-local setroubleshoot[8479]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 14:26:08 zonemndr-v-rotech-local python[8479]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                      If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:30:16 zonemndr-v-rotech-local setroubleshoot[8837]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 14:30:16 zonemndr-v-rotech-local python[8837]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                      If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:30:16 zonemndr-v-rotech-local setroubleshoot[8837]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 14:30:16 zonemndr-v-rotech-local python[8837]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                      If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                      # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:49:59 zonemndr-v-rotech-local setroubleshoot[10193]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 14:49:59 zonemndr-v-rotech-local python[10193]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                       If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:49:59 zonemndr-v-rotech-local setroubleshoot[10193]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 14:49:59 zonemndr-v-rotech-local python[10193]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                       If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:57:50 zonemndr-v-rotech-local setroubleshoot[10917]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 14:57:50 zonemndr-v-rotech-local python[10917]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                       If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 14:57:50 zonemndr-v-rotech-local setroubleshoot[10917]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 14:57:50 zonemndr-v-rotech-local python[10917]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                       If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:04:11 zonemndr-v-rotech-local setroubleshoot[11583]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 15:04:11 zonemndr-v-rotech-local python[11583]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                       If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:04:12 zonemndr-v-rotech-local setroubleshoot[11583]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 15:04:12 zonemndr-v-rotech-local python[11583]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                       If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:09:37 zonemndr-v-rotech-local setroubleshoot[11799]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 15:09:37 zonemndr-v-rotech-local python[11799]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                       If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:09:38 zonemndr-v-rotech-local setroubleshoot[11799]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 15:09:38 zonemndr-v-rotech-local python[11799]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                       If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:11:21 zonemndr-v-rotech-local setroubleshoot[12082]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 15:11:21 zonemndr-v-rotech-local python[12082]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                       If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:11:21 zonemndr-v-rotech-local setroubleshoot[12082]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 15:11:21 zonemndr-v-rotech-local python[12082]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                       If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:12:15 zonemndr-v-rotech-local setroubleshoot[12157]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 15:12:15 zonemndr-v-rotech-local python[12157]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                       If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:12:15 zonemndr-v-rotech-local setroubleshoot[12157]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm. For complete SELinux messages. run sealert -l df29b986-ef06-4d27-be0c-670d53c66b0c
:Jan 28 15:12:15 zonemndr-v-rotech-local python[12157]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from write access on the directory /dev/shm.
:                                                       If you believe that nph-zms should be allowed write access on the shm directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:12:46 zonemndr-v-rotech-local setroubleshoot[12246]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu. For complete SELinux messages. run sealert -l d19ba56c-877a-4871-8f4a-d97f8a5d825d
:Jan 28 15:12:46 zonemndr-v-rotech-local python[12246]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the directory cpu.
:                                                       If you believe that nph-zms should be allowed read access on the cpu directory by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:Jan 28 15:12:46 zonemndr-v-rotech-local setroubleshoot[12246]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the file 00001-capture.jpg. For complete SELinux messages. run sealert -l 0285e5e1-6d49-4f2d-b4b0-bc81a9891be2
:Jan 28 15:12:46 zonemndr-v-rotech-local python[12246]: SELinux is preventing /usr/libexec/zoneminder/cgi-bin/nph-zms from read access on the file 00001-capture.jpg.
:                                                       If you believe that nph-zms should be allowed read access on the 00001-capture.jpg file by default.
:                                                       # grep nph-zms /var/log/audit/audit.log | audit2allow -M mypol
:[User Logs]:
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: CentOS7, some file permission errors...

Post by rockandroller »

And actually it IS recording, when set to "record" manually ...
if I bring up the event I can see the frames and stills are actually there.

and MoDetect IS WORKING. **

It's just the empty first frame there that is missing:
emptyframe.png
emptyframe.png (23.33 KiB) Viewed 5989 times
(I was expecting an actual playable video to pop up there, guess I better read the manual some more...)

**MoDetect "sort of" working... it will capture an event, then stop. And then nothing happens again, till I reset back to monitor, then again back to MoDetect....
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: CentOS7, some file permission errors...

Post by rockandroller »

OK, so I set selinux config to "permissive" (logs stuff, but doesn't interfere!) and this seems to have magically restored ZoneMinder functionality, with no more errors in the system log. Guess I've got some SELINUX tuning to trudge through, in the near future... "Selinux, the root of all evil"®
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: [SOLVED*] CentOS7, some file permission errors... *workaround

Post by knight-of-ni »

You have to follow all the steps documented in README.Centos7, including the step which states to disable selinux.

https://github.com/ZoneMinder/ZoneMinde ... ME.Centos7
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: [SOLVED*] CentOS7, some file permission errors... *workaround

Post by rockandroller »

Wow... :oops: I managed to not SEE that file before! :oops:
* Probably would be good to have it posted at http://zoneminder.readthedocs.org/en/la ... entos.html ...

Anyway, I am doing a fresh clean install of Centos7, simply because my original install had a 50GB /dev/root/ and a 2TB dev/home/ ... but according to the ZM docs the "recording files" must be in the wwwroot folder, and that folder by default is in the 50GB partition, not the 2TB partition! Looks like a process fraught with danger to try to relocate wwwroot... So I think I had best just start over, and try to make /dev/root/ the 2 TB partition.

** Originally I was going for the concept of "small OS partition / big data partition"... the philosophy being if the OS got "scrambled" it would be a quick fix to restore it from a smaller image backup... I suppose something similar could be implemented with selective file backups rather than partition images.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: [SOLVED*] CentOS7, some file permission errors... *workaround

Post by knight-of-ni »

The link I provided in the last post is the same README included in the zoneminder rpm package hosted on zmrepo.

You know, it doesn't seem to matter how many times I tell people to read the README.
There always seems to be someone who doesn't care to follow the instructions and will proceed to give an excuse as to why is was too difficult to find. And sure enough, that person will show up in the forum asking questions, which are answered in the instructions.

The instructions to read the README are clearly stated at the bottom of the zmrepo.zoneminder.com site:
Once ZoneMinder has been installed, it is critically important that you read the README file under /usr/share/doc/zoneminder. ZoneMinder will not run without completing the steps outlined in the README.
And it appears a second time on the zmrepo site after choosing your distro from the dropdown:
wget http://zmrepo.zoneminder.com/el/7/x86_6 ... noarch.rpm
sudo yum install --nogpgcheck zmrepo-7-6.el7.centos.noarch.rpm
sudo yum install zoneminder
less /usr/share/doc/zoneminder-*/README.Centos7
It's also stated in the ZoneMinder Wiki at https://wiki.zoneminder.com/CentOS
Installation

Please navigate to http://zmrepo.zoneminder.com/ and select your distro from the drop-down to view the installation instructions.

Remember to follow the steps documented in README.Centos7 following installation of the ZoneMinder rpm.
But wait, I'm not done yet. After you yum install the zoneminder rpm, the README will actually scroll across your screen during the installation process. Packages newer than 1.28.1 just get a reminder to read the README, which is on your filesystem under /usr/share/doc/zoneminder-1.28.1.

That makes four reminders telling you to read the README. Four!

I can't possibly make it any more clear that if you don't RTFM than you are virtually guaranteed to end up with a system that doesn't work correctly.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: [SOLVED*] CentOS7, some file permission errors... *workaround

Post by rockandroller »

Yes, totally my brain damage kicking in (multiple concussions)... I actually did step through that - but somehow skipped the step of editing the /etc/selinux/config. Will pay more attention next time, sorry about that! :oops: :oops: :oops: :oops: :oops:
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: [SOLVED*] CentOS7, some file permission errors... *workaround

Post by knight-of-ni »

Fair enough. I apologize for the outburst of frustration. We know how difficult ZoneMinder can be. To mitigate that we've spent a lot of time writing documentation, specific to each major distro, which avoids the majority of installation problems.

If you want to use a dedicated drive or volume for your events (this is recommended), then this guide should help:
https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive

The important thing to note, is that you should not symlink the events folder to another location. Do what the guide says and bind mount.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked