Page 1 of 1

"Cannot write to content dirs" ERROR

Posted: Fri Mar 04, 2016 6:43 pm
by sb3rla
Hi everybody, need help with this issue. ZM tell me this:

Cannot write to content dirs('/home/pi/sandisk_DATI/events','/home/pi/sandisk_DATI/images'). Check that these exist and are owned by the web account user

Here the folder:

pi@raspberrypi:~ $ ls -al /home/pi/sandisk_DATI/zoneminder/
totale 16
drwxrwxrwx 4 www-data www-data 4096 mar 3 20:37 .
drwxrwxrwx 6 root root 4096 mar 3 20:39 ..
drwxrwxrwx 2 www-data www-data 4096 mar 3 20:37 events
drwxrwxrwx 2 www-data www-data 4096 mar 3 20:37 images


they exist and owned by www-data .

also /var/cache/zoneminder

pi@raspberrypi:~ $ ls -al /var/cache/zoneminder/
totale 20
drwxr-xr-x 5 www-data www-data 4096 mar 4 17:20 .
drwxr-xr-x 14 root root 4096 dic 27 23:32 ..
drwxrwxrwx 2 www-data www-data 4096 mar 3 20:37 events
drwxrwxrwx 2 www-data www-data 4096 mar 3 20:37 images
drwxr-xr-x 2 root root 4096 feb 21 11:06 temp
pi@raspberrypi:~ $


and are binded in fstab:

/home/pi/sandisk_DATI/zoneminder/images /var/cache/zoneminder/images none defaults,bind 0 2
/home/pi/sandisk_DATI/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2



and this issue make unusable the webgui interface to change the wrong path !! so nasty!!

How can i change it without webgui console?
Thanks all

Re: "Cannot write to content dirs" ERROR

Posted: Fri Mar 04, 2016 7:45 pm
by bbunge
What format are you using on your flash disk? Sure hope it is EXT 2, 3 or 4.

Re: "Cannot write to content dirs" ERROR

Posted: Fri Mar 04, 2016 9:08 pm
by sb3rla
yes ext3...

But is there a way to change the path of images/event folder without using the web console?

Re: "Cannot write to content dirs" ERROR

Posted: Fri Mar 04, 2016 9:28 pm
by knight-of-ni
Cannot write to content dirs('/home/pi/sandisk_DATI/events','/home/pi/sandisk_DATI/images'). Check that these exist and are owned by the web account user
This is this problem right here. You should not have changed the default values under Options.
Go back into Options, and set DIR_EVENTS and DIR_IMAGES back to their default values of "events" and "images".

Re: "Cannot write to content dirs" ERROR

Posted: Fri Mar 04, 2016 9:53 pm
by sb3rla
ty for reply...

i would like to go back to option and fix the wrong path but web console dont work!


is there any .conf file where i can put down the right path?

Re: "Cannot write to content dirs" ERROR

Posted: Fri Mar 04, 2016 10:47 pm
by knight-of-ni
Then you need to fix that first.
Please describe to us what "don't work" means.

Re: "Cannot write to content dirs" ERROR

Posted: Sun Apr 10, 2016 11:27 pm
by kerniew
Here is my admission - I did the same as the original poster - I changed the events directory to something that zoneminder doesn't like. The last post asked "what does not work mean".

Here is what I get when I enter http://localhost/zm in the address bar of my browser (chrome):

"Cannot write to content dirs('/mnt/networkdrive/directoryonnetworkdrive/events','/mnt/networkdrive/useronnetworkdrive/images'). Check that these exist and are owned by the web account user"

All on one line, text only, no web gui.

Got it. Me bad. However, like the previous poster said, there is no way to access the "options" link from the zoneminder page. Thus, there is no way to correct it.

I assume there is a text file on my drive somewhere that I could edit and change my directories back to 'events' and 'images', but I can't find that file.

Help appreciated. Thanks.

Re: "Cannot write to content dirs" ERROR

Posted: Sun Apr 10, 2016 11:56 pm
by knight-of-ni
The setting you are looking for is stored in the database. It is not in a config file.

Try making this change to index.php:
https://github.com/ZoneMinder/ZoneMinder/pull/1412

It should allow you to proceed to Options and change the setting.

Note that it is very important to read and understand the help text (click "?") for each option before changing it from the default. In your case, the help text warns the end user against doing exactly what you did. Instead, you probably want to do what is described here:
https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive