ZoneMinder does not show camera view in zone editor

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
dma_k
Posts: 27
Joined: Sat Jan 19, 2013 5:58 pm

ZoneMinder does not show camera view in zone editor

Post by dma_k » Tue Dec 17, 2013 11:10 am

When I try to edit a zone for the given camera, the camera view is not rendered. Log file reads:

Code: Select all

ERR	Can't open Zones1.jpg: Permission denied	zm_image.cpp	402
so I believe ZoneMinder is trying to create JPEG image somewhere in current directory, which is not writeable. cwd for zmc and zma processes is /usr/share/zoneminder – definitely not writeable.

zm_monitor.cpp:980 reads:

Code: Select all

    static char filename[PATH_MAX];
    snprintf( filename, sizeof(filename), "Zones%d.jpg", id );
    zone_image.WriteJpeg( filename );
Difficult to say what is the context (e.g. current directory)... What could be the solution?

mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: ZoneMinder does not show camera view in zone editor

Post by mastertheknife » Tue Dec 17, 2013 2:45 pm

Hi,

/usr/share/zoneminder/www typically contains static data. The events and images are typically stored in /var/lib/zoneminder/[events,images]
DIR_IMAGES is typically pointing to "images" which is a symlink from /usr/share/zoneminder/www/images to /var/lib/zoneminder/images
Same goes for DIR_EVENTS ("events" is a symlink to var/lib/zoneminder/events")
The paths need to be accessible and writeable by apache (or www-data, depending on your distro)

If this was ZM 1.26.4 or newer, you could just run "zmlinkcontent.sh /var/lib/zoneminder" and it takes care of ownership, permissions and the symlinks.
Kfir Itzhak.

dma_k
Posts: 27
Joined: Sat Jan 19, 2013 5:58 pm

Re: ZoneMinder does not show camera view in zone editor

Post by dma_k » Fri Dec 20, 2013 11:46 pm

mastertheknife wrote:/usr/share/zoneminder/www typically contains static data. The events and images are typically stored in /var/lib/zoneminder/[events,images]
DIR_IMAGES is typically pointing to "images" which is a symlink from /usr/share/zoneminder/www/images to /var/lib/zoneminder/images
Same goes for DIR_EVENTS ("events" is a symlink to var/lib/zoneminder/events")
The paths need to be accessible and writeable by apache (or www-data, depending on your distro)

If this was ZM 1.26.4 or newer, you could just run "zmlinkcontent.sh /var/lib/zoneminder" and it takes care of ownership, permissions and the symlinks.
Many thanks for this information! Actually, it turned out that both directories are synlinked:

Code: Select all

/usr/share/zoneminder$ ll
drwxr-xr-x  13 root root  4096 Dec 17 12:10 .
drwxr-xr-x 243 root root  8192 Dec 16 03:35 ..
drwxr-xr-x   2 root root   119 Dec 16 03:37 ajax
-rw-r--r--   1 root root 62762 Dec 12  2010 cambozola.jar
lrwxrwxrwx   1 root root    17 Feb 13  2013 cgi-bin -> ../../lib/cgi-bin
drwxr-xr-x   2 root root    58 Dec 16 03:37 css
drwxr-xr-x   2 root root  4096 Dec 16 03:37 db
lrwxrwxrwx   1 root root    28 Feb 13  2013 events -> /var/cache/zoneminder/events
drwxr-xr-x   2 root root    64 Dec 16 03:37 graphics
lrwxrwxrwx   1 root root    28 Feb 13  2013 images -> /var/cache/zoneminder/images
drwxr-xr-x   2 root root   140 Dec 16 04:14 includes
-rw-r--r--   1 root root  3795 Feb 13  2013 index.php
drwxr-xr-x   2 root root    39 Dec 16 03:37 js
drwxr-xr-x   2 root root  4096 Dec 16 03:37 lang
drwxr-xr-x   5 root root    43 Dec 16 02:47 skins
drwxr-xr-x   2 root root     6 Feb 13  2013 sounds
lrwxrwxrwx   1 root root    26 Feb 13  2013 temp -> /var/cache/zoneminder/temp
lrwxrwxrwx   1 root root     4 Dec 17 12:10 tmp -> /tmp
drwxr-xr-x   2 root root     6 Feb 13  2013 tools
drwxr-xr-x   2 root root    37 Dec 16 03:37 views
and /var/cache/zoneminder/images was owed by root. After chown I can see zones! Problem is solved.

I would personally vote that error log contains full file path – then one can solve the problem faster.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests