Zone images not available on larger partition
Zone images not available on larger partition
I've installed and built the ZMLiveCD created by bbushong. Everything is pretty much working just fine. There are a couple of issues that I'm working on one of which is trying to get the events and images stored on a different partition on the same drive.
I have created directories called /usr/zm-events and /usr/zm-images in the larger partition. Using the above directory names directly in the ZM options/paths settings the ZM console recognizes that I'm on a different partition because the % used goes from 67% down to 3%.
However no images are stored in the events directory and when trying to define zones there is no image to use. When I switch the path configuration back to the default event and image directories then images show up in the zone windows and events are captured and are viewable.
I'm certain its some kind of a permissions issue but I can't seem to work it out.
I have also tried creating symlinks using the following syntax (first time I've dealt with symlinks).
ln -s /usr/zm-events /events
ln -s /usr/am-images /images
I have set the permissions on the /usr/zm-events and /usr/zm-images directories to match those used by the real zm events and images directories. Still doesn't work.
So what am I doing wrong?!!
Any help would be greatly appreciated.
Thanks,
Brad
I have created directories called /usr/zm-events and /usr/zm-images in the larger partition. Using the above directory names directly in the ZM options/paths settings the ZM console recognizes that I'm on a different partition because the % used goes from 67% down to 3%.
However no images are stored in the events directory and when trying to define zones there is no image to use. When I switch the path configuration back to the default event and image directories then images show up in the zone windows and events are captured and are viewable.
I'm certain its some kind of a permissions issue but I can't seem to work it out.
I have also tried creating symlinks using the following syntax (first time I've dealt with symlinks).
ln -s /usr/zm-events /events
ln -s /usr/am-images /images
I have set the permissions on the /usr/zm-events and /usr/zm-images directories to match those used by the real zm events and images directories. Still doesn't work.
So what am I doing wrong?!!
Any help would be greatly appreciated.
Thanks,
Brad
You also have to configure apache correctly.
Setting the directive FollowSymlinks usualy works or else you can define the directories.
http://httpd.apache.org/docs/2.2/mod/co ... #directory
Setting the directive FollowSymlinks usualy works or else you can define the directories.
http://httpd.apache.org/docs/2.2/mod/co ... #directory
Cordel, below is what I found in my httpd.conf file. It appears that the FollowSymLinks is enabled. Am I missing something here?cordel wrote:You also have to configure apache correctly.
Setting the directive FollowSymlinks usualy works or else you can define the directories.
http://httpd.apache.org/docs/2.2/mod/co ... #directory
<Directory /var/www/html>
# Loosen perms to make ZMliveCD work
# This should be set back to default
# after installation
# Options -All -Multiviews
Options -All -Multiviews FollowSymLinks SymLinksifOwnerMatch
# end ZMliveCD hack
AllowOverride None
Order deny,allow
Deny from all
</Directory>
I've attached part of the contents of my httpd error_log file. I think the last entry is the most telling one. Apache seems to be pointing towards the /var/www/html.../zm-images directory which does not exist. the /zm-images is the name of my symlink. so the question I have is why isn't apache recognizing my symlink? It appears from the info I provided in an earlier post shows that apache should follow symlinks. That leads me to believe I've created my symlink incorrectly.
Any thoughts?
httpd error_log file
[Thu Feb 07 18:35:28 2008] [warn] [client 192.168.1.101] Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms
[Thu Feb 07 18:35:28 2008] [warn] [client 192.168.1.100] Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms
[Thu Feb 07 18:37:16 2008] [error] [client 192.168.1.50] File does not exist: /var/www/html/zm-images, referer: http://192.168.1.50/zm/index.php?view=zones&mid=4
Any thoughts?
httpd error_log file
[Thu Feb 07 18:35:28 2008] [warn] [client 192.168.1.101] Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms
[Thu Feb 07 18:35:28 2008] [warn] [client 192.168.1.100] Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms
[Thu Feb 07 18:37:16 2008] [error] [client 192.168.1.50] File does not exist: /var/www/html/zm-images, referer: http://192.168.1.50/zm/index.php?view=zones&mid=4
Another piece of the puzzle?
I'm not sure what this is telling me as yet but when I click on the "Zones" link on the Monitor page I get the Camera4 zones page with a broken link to the image. The link for the missing image is http://192.168.1.50/zm/zm-images/Camera ... 1202431814.
Again, the symlink does not seem to be functioning correctly. There is no /zm/zm-images directory. There is a /zm/images directory which is the default one for Zoneminder.
So the question is, what am I doing wrong! I have found that Zoneminder is populating the /usr/zm-events/4 directory with events as I move around in front of the camera which is what I would expect from my symlink. It would seem I'm close to getting things to work, just missing one little piece of the puzzle!
Thanks,
Brad
Again, the symlink does not seem to be functioning correctly. There is no /zm/zm-images directory. There is a /zm/images directory which is the default one for Zoneminder.
So the question is, what am I doing wrong! I have found that Zoneminder is populating the /usr/zm-events/4 directory with events as I move around in front of the camera which is what I would expect from my symlink. It would seem I'm close to getting things to work, just missing one little piece of the puzzle!
Thanks,
Brad
Re: Zone images not available on larger partition
Check your path for ZMS, it should be relative to the web root and not the system root other wise apache will not be able to access it. But your also using a LiveCD I am not familure with so they may have configured ti another nonstandard way and if thats the case you might want to find another distro as you don't know what kind of security issues might be introduced from not being properly configured.BKahler wrote:I've installed and built the ZMLiveCD created by bbushong.
[Thu Feb 07 18:35:28 2008] [warn] [client 192.168.1.100] Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms
Re: Zone images not available on larger partition
Cordel, I miss quoted who developed the ZMLiveCD. It is actually the Mandriva 2007 based 1.22.3 LiveCD developed by rdmelin and hosted by bbushong.cordel wrote:Check your path for ZMS, it should be relative to the web root and not the system root other wise apache will not be able to access it. But your also using a LiveCD I am not familure with so they may have configured ti another nonstandard way and if thats the case you might want to find another distro as you don't know what kind of security issues might be introduced from not being properly configured.BKahler wrote:I've installed and built the ZMLiveCD created by bbushong.
[Thu Feb 07 18:35:28 2008] [warn] [client 192.168.1.100] Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms
I checked the ZM_PATH_ZMS path in the console config and its /cgi-bin/nph-zms. I tried removing the nph- just to see what happened and it still seemed to work with the exception of the missing zone image.
Any other suggestions on where to look?
Thanks!
Brad
Good that one am am familure with
And I'm supprized that it's not working as Ross puts together the best livecd.
Images for zones are stored in the Images directory, check and make sure that there are current files there, it should update the images each time you open a zone edit page. This sounds more like a permissions problem than any thing else.
Let me know if you would like me to ssh into the box and take a look.
I'll also be moving this thread into the livecd topic soon.
And I'm supprized that it's not working as Ross puts together the best livecd.
Images for zones are stored in the Images directory, check and make sure that there are current files there, it should update the images each time you open a zone edit page. This sounds more like a permissions problem than any thing else.
Let me know if you would like me to ssh into the box and take a look.
I'll also be moving this thread into the livecd topic soon.
Cordel, I tend to agree that its a permissions problem now. I am almost positive I have the symlinks setup correctly because I can be in a terminal window and do a copy command to move files based on the symlink name. Also zoneminder is definitely looking at the right disk for percentage of disk space used so I'm at a total stand still at this point.cordel wrote:Good that one am am familure with
And I'm suprized that it's not working as Ross puts together the best livecd.
Images for zones are stored in the Images directory, check and make sure that there are current files there, it should update the images each time you open a zone edit page. This sounds more like a permissions problem than any thing else.
Let me know if you would like me to ssh into the box and take a look.
I'll also be moving this thread into the livecd topic soon.
Where I'm at now is with what I believe are the correct symlinks I get no images stored in my /usr/zm-events directory even though in a terminal window I can copy to the symlink and they get there.
In my ZM control console-options-paths I have set up the following:
ZM_DIR_EVENTS = events/zm-events
ZM_DIR_IMAGES = images/zm-images
My symlinks are written as follows:
ln -s /usr/zm-images /var/www/html/zm/images
ln -s /usr/zm-events /var/www/html/zm/events
When I am in this configuration my disk % used goes from 64% to 3% which is what I would have expected.
All of the permissions seem to be the same -rw-r--r--
Everything works fine if I set things back to the way the LiveCD came configured its
Needless to say I am a total loss now. I'm still trying to learn linux in my spare time which I don't have much of.
I my just take you up on your offer to ssh in and see if you can fix the problem.
Thanks,
Brad
I gave it a try and it didn't seem to help.rdmelin wrote:Try "sudo chown apache.apache /var/www/html/zm/images "
I know I had ownership if this dir wrong earlier. I think upgrade with a newer zm RPM will also fix this problem.
Can you point me towards an upgrade link that I can download?
By the way, I'm very impressed with how easy the LiveCD was to install and use. It made a huge difference in how fast I was able to get it to work compared to my first attempt a year or so ago.
Thanks!
Brad
http://www.zoneminder.com/wiki/index.ph ... _RPM_notesCan you point me towards an upgrade link that I can download?
There is now a 1.23.1 package
Some notes in this thread about new perl mods and using urpmi to fill in other additional required packages.
http://www.zoneminder.com/forums/viewto ... 9735#39735
BKahler now that I've had time to read this whole thread properly I have a couple suggestions.
If you just want a large partition for event storage you can choose a large partition for /var when installing. This is my standard practice.
If you dont want to reinstall and want events only on a separate partition you can mount the partition on /var/www/html/zm/events.
Or you can delete the events directory and make events a symlink to the mount point of the partition.
Either way will require no changes in config of zm or apache as apache is already configured to allow symlinks (so it will work running from the livecd)
If you just want a large partition for event storage you can choose a large partition for /var when installing. This is my standard practice.
If you dont want to reinstall and want events only on a separate partition you can mount the partition on /var/www/html/zm/events.
Or you can delete the events directory and make events a symlink to the mount point of the partition.
Either way will require no changes in config of zm or apache as apache is already configured to allow symlinks (so it will work running from the livecd)