[SOLVED] Cannot write to content dirs

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
rockell
Posts: 2
Joined: Mon Sep 26, 2016 3:17 am

[SOLVED] Cannot write to content dirs

Post by rockell » Mon Sep 26, 2016 3:24 am

Hi,

I'm running RedHat 7 and zoneminder v1.30.0.
After i installed zoneminder using the CentOS/RH7, the website loads up fine. However, console is stopped. When I try to start the console, It remains stopped and checking the log I get:

Code: Select all

 2016-09-25 20:20:34.277911	web_php		20799	ERR	Cannot write to content dirs('events','images'). Check that these exist and are owned by the web account user	/usr/share/zoneminder/www/index.php	147
 
Please keep in mind I haven't changed anything in Options -> Path. It still only says "events" and "images"
I checked the forum and most seem to tell you to change the "usr/share/zoneminder/www/images" etc folder to www-data:www-data group in ubuntu which I assume would be apache:apache and I've done so:

Code: Select all

ls -l /usr/share/zoneminder/www/
total 32
drwxr-xr-x. 2 apache apache 4096 Sep 25 16:31 ajax
drwxr-xr-x. 4 apache apache 4096 Sep 25 16:31 api
lrwxrwxrwx. 1 apache apache   24 Sep 25 16:31 cambozola.jar -> ../../java/cambozola.jar
drwxr-xr-x. 2 apache apache   58 Sep 25 16:31 css
lrwxrwxrwx. 1 apache apache   37 Sep 25 16:31 events -> ../../../../var/lib/zoneminder/events
drwxr-xr-x. 2 apache apache   64 Sep 25 16:31 graphics
lrwxrwxrwx. 1 apache apache   37 Sep 25 16:31 images -> ../../../../var/lib/zoneminder/images
drwxr-xr-x. 2 apache apache 4096 Sep 25 16:31 includes
-rw-r--r--. 1 apache apache 6475 Jul 28 16:36 index.php
drwxr-xr-x. 2 apache apache   61 Sep 25 16:31 js
drwxr-xr-x. 2 apache apache 4096 Sep 25 16:31 lang
-rw-r--r--. 1 root   root   1700 Sep 25 20:06 mypol.pp
-rw-r--r--. 1 root   root    503 Sep 25 20:06 mypol.te
drwxr-xr-x. 3 apache apache   20 Sep 25 16:31 skins
drwxr-xr-x. 2 apache apache   25 Sep 25 16:31 sounds
lrwxrwxrwx. 1 apache apache   35 Sep 25 16:31 temp -> ../../../../var/lib/zoneminder/temp
drwxr-xr-x. 4 apache apache   38 Sep 25 16:31 tools
drwxr-xr-x. 2 apache apache   37 Sep 25 16:31 views
and in /var/lib/zoneminder/

Code: Select all

ls -l /var/lib/zoneminder/
total 0
drwxr-xr-x. 2 apache apache  6 Jul 31 05:29 events
drwxr-xr-x. 2 apache apache  6 Jul 31 05:29 images
drwxr-xr-x. 2 apache apache 22 Sep 25 20:14 sock
drwxr-xr-x. 2 apache apache  6 Jul 31 05:29 swap
drwxr-xr-x. 2 apache apache  6 Jul 31 05:29 temp
However that still doesn't work after I restart the zoneminder service.

I really have no other idea on how to make this work... any suggestion would be helpful.

Thanks!

-Rockell

rockell
Posts: 2
Joined: Mon Sep 26, 2016 3:17 am

Re: [SOLVED] Cannot write to content dirs

Post by rockell » Mon Sep 26, 2016 4:24 am

nvm, figured out what was wrong.... apparently the user/group was under my actual username instead of apache/apache. Once I changed that it in httpd.conf, it works now.

User avatar
knight-of-ni
Posts: 2257
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: [SOLVED] Cannot write to content dirs

Post by knight-of-ni » Mon Sep 26, 2016 11:52 am

So you are saying that the User & Group directives found in /etc/httpd/conf/httpd.conf were set to your username rather than apache?
This seems extremely unusual that the httpd rpm would install itself that way by default.

Did you have to enable any auxiliary RHEL repos in order to satisfy all of ZoneMinder's package dependencies? I am reasonably certain the answer is yes here, but what I really would like to know is the name of the repo.

Since RHEL is not free, I don't have access to it and can't test on it. The only way I know it works is through end user feedback.
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/

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests