External Web Page image extraction
Posted: Wed Feb 18, 2009 10:18 pm
Hi all,
I've been using ZM for some time now and have it working great, the only issue I have is I run a separate virtual host webpage hosted by the same computer as ZM and use this to display selected monitors from ZM, monitors I want to view from public computers or let friends see. so the main thing from this page be security of the ZM side.
so far I have the public page display the images by using a feed directly into ZM so exposing ZM to the unfiltered webpage, I use the following code in my page to display images
http://192.168.0.2/cgi-bin/nph-zms?mode ... s=password
this lets the public see the username and password for a limited ZM account I have and also for those who are educated with these things that I run a ZM system behind it and possibly allow them to use some as yet unknow exploit to gain access.
Searching this forum I came across a possible solution to extract the image using zmu with the following command
zmu -m 1 -U admin -P password -i
This allowed me to produce an image file in the directory I ran the command from and then use this as the source for my public webpage.
http://www.zoneminder.com/forums/viewto ... ract+image
with this early success I wanted to automate the process with a little bit of php on my webpage
<php>
exec('(cd /var/www/html ; /usr/local/bin/zmu -m 1 -U admin -P password -i -v)');
?>
with this I should be able to run the image extraction automatically when ever I visit the page and get the latest image from the camera, the only problem is this dosent work and im my ZM log files says it does not have permission to access the image file its trying the write, Im guessing this is a user access problem but after hours of surfing I cant find a solution.
Error:
Feb 18 16:36:05 zoneminder_system zmu[1392]: ERR [Can't open Front_Door.jpg: Permission denied]
can anyone help in getting this small part of php script working, or give an alternative method to get images out of ZM.
Thanks
I've been using ZM for some time now and have it working great, the only issue I have is I run a separate virtual host webpage hosted by the same computer as ZM and use this to display selected monitors from ZM, monitors I want to view from public computers or let friends see. so the main thing from this page be security of the ZM side.
so far I have the public page display the images by using a feed directly into ZM so exposing ZM to the unfiltered webpage, I use the following code in my page to display images
http://192.168.0.2/cgi-bin/nph-zms?mode ... s=password
this lets the public see the username and password for a limited ZM account I have and also for those who are educated with these things that I run a ZM system behind it and possibly allow them to use some as yet unknow exploit to gain access.
Searching this forum I came across a possible solution to extract the image using zmu with the following command
zmu -m 1 -U admin -P password -i
This allowed me to produce an image file in the directory I ran the command from and then use this as the source for my public webpage.
http://www.zoneminder.com/forums/viewto ... ract+image
with this early success I wanted to automate the process with a little bit of php on my webpage
<php>
exec('(cd /var/www/html ; /usr/local/bin/zmu -m 1 -U admin -P password -i -v)');
?>
with this I should be able to run the image extraction automatically when ever I visit the page and get the latest image from the camera, the only problem is this dosent work and im my ZM log files says it does not have permission to access the image file its trying the write, Im guessing this is a user access problem but after hours of surfing I cant find a solution.
Error:
Feb 18 16:36:05 zoneminder_system zmu[1392]: ERR [Can't open Front_Door.jpg: Permission denied]
can anyone help in getting this small part of php script working, or give an alternative method to get images out of ZM.
Thanks