Cannot write to content dirs

Forum for questions and support relating to the 1.29.x releases only.
Locked
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Cannot write to content dirs

Post by redxiii »

I cloned an old system to a new system and now getting the error when I try to access the console,

Code: Select all

Cannot write to content dirs('events','images'). Check that these exist and are owned by the web account user
Yes they do exist and are owned by www-data. All the data is the same as in the last system which was working fine. Just the computer has changed. /var/cache/zoneminder is on a different partition. Any ideas? I searched around but didn't notice anything relevant. Thanks

Code: Select all

root@gemma:~# ls -la /var/cache/zoneminder/
total 36
drwxr-xr-x  6 www-data www-data  4096 Jun 20 22:01 .
drwxr-xr-x 10 root     root      4096 Jul  2  2016 ..
drwxr-xr-x  7 www-data www-data  4096 Jun  8  2017 events
drwxr-xr-x  2 www-data www-data  4096 Jun 26  2016 images
drwx------  2 root     root     16384 Feb 16  2017 lost+found
drwxr-xr-x  2 www-data www-data  4096 Nov 11  2017 temp

root@gemma:~# ls -la /usr/share/zoneminder/www
total 60
drwxr-xr-x 13 www-data www-data 4096 Jun 20 21:39 .
drwxr-xr-x  4 www-data www-data 4096 Jun 25  2016 ..
drwxr-xr-x  2 www-data www-data 4096 Jun 25  2016 ajax
drwxr-xr-x  4 www-data www-data 4096 Jun 25  2016 api
drwxr-xr-x  2 www-data www-data 4096 Jun 25  2016 css
drwxr-xr-x  7 www-data www-data 4096 Jun 20 21:39 events
drwxr-xr-x  2 www-data www-data 4096 Jun 25  2016 graphics
drwxr-xr-x  2 www-data www-data 4096 Jun 25  2016 includes
-rw-r--r--  1 www-data www-data 6435 Feb  3  2016 index.php
drwxr-xr-x  2 www-data www-data 4096 Jun 25  2016 js
drwxr-xr-x  2 www-data www-data 4096 Jun 25  2016 lang
drwxr-xr-x  5 www-data www-data 4096 Jun 25  2016 skins
drwxr-xr-x  3 www-data www-data 4096 Jun 25  2016 tools
drwxr-xr-x  2 www-data www-data 4096 Jun 25  2016 views

root@gemma:~# service zoneminder status
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
   Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled)
   Active: active (running) since Sun 2020-06-21 14:11:46 MST; 12min ago
  Process: 23352 ExecStop=/usr/bin/zmpkg.pl stop (code=exited, status=0/SUCCESS)
  Process: 23395 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
 Main PID: 23414 (zmdc.pl)
   CGroup: /system.slice/zoneminder.service
           ├─23414 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
           ├─23446 /usr/bin/zma -m 1
           ├─23479 /usr/bin/zma -m 3
           ├─23498 /usr/bin/zma -m 4
           ├─23523 /usr/bin/zma -m 5
           ├─23526 /usr/bin/perl -wT /usr/bin/zmfilter.pl
           ├─23534 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
           ├─23543 /usr/bin/perl -wT /usr/bin/zmtrigger.pl
           ├─23553 /usr/bin/perl -wT /usr/bin/zmwatch.pl
           ├─23557 /usr/bin/zma -m 2
           ├─23731 /usr/bin/zmc -m 2
           ├─23736 /usr/bin/zmc -m 3
           ├─23741 /usr/bin/zmc -m 4
           ├─23746 /usr/bin/zmc -m 5
           └─23754 /usr/bin/zmc -m 1

Jun 21 14:22:47 gemma zmc[23715]: WAR [Can't connect to remote camera: Connection timed out]
Jun 21 14:22:47 gemma zmc[23715]: ERR [Unable to connect to the remote camera, aborting]
Jun 21 14:22:47 gemma zmc[23715]: ERR [Unable to connect to camera]
Jun 21 14:22:47 gemma zmc[23715]: ERR [Failed to pre-capture monitor 1 -1761374780 (1/1)]
Jun 21 14:22:47 gemma zmdc[23414]: ERR ['zmc -m 1' exited abnormally, exit status 255]
Jun 21 14:22:50 gemma zmwatch[23553]: INF [Restarting capture daemon for Carport, shared data not valid]
Jun 21 14:22:51 gemma zmdc[23754]: INF ['zmc -m 1' started at 20/06/21 14:22:51]
Jun 21 14:22:51 gemma zmdc[23414]: INF ['zmc -m 1' starting at 20/06/21 14:22:51, pid = 23754]
Jun 21 14:22:51 gemma undef[23754]: INF [No Server ID or Name specified in config.  Not using Multi-Server Mode.]
Jun 21 14:22:51 gemma zmc[23754]: INF [Starting Capture version 1.29.0]
root@gemma:~# 
The errors shown are expected since the machine is at my house and not the site with the cameras. I just need to access the console to make sure everything is OK.
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Re: Cannot write to content dirs

Post by redxiii »

I make the change indicated here, https://github.com/ZoneMinder/zoneminde ... 1412/files and now can get into the console at least, but still getting the error over and over,

Code: Select all

Cannot write to content dirs('events','images'). Check that these exist and are owned by the web account user
Strange if you ask me since i just cloned everything over from the old HD, is it because the computer is on my network and not the client's network? We will see
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Re: Cannot write to content dirs

Post by redxiii »

It looks good now, all the errors have gone away and ZM is working as expected. Guess changing the network on the computer has adverse effects.
Locked