Changing Image/events directory to another location!
-
- Posts: 7
- Joined: Sun Aug 31, 2008 6:02 pm
Changing Image/events directory to another location!
I have setup zoneminder and have it working great but the /var/www/html/zm/events and image directories are filling way up to fast and I want to tell Zoneminder to put any events or images in another directory that has alot more disk space like /home/test/zm/events. Everytime I go under zm/options/paths and change the directory and restart zm it does nothing. I read that you have to create a symbolic link to your new directory and then it will work but I have not had success. Any suggestions? In other words I want to store the stuff in another location.





-
- Posts: 7
- Joined: Sun Aug 31, 2008 6:02 pm
When I created the partitions I gave the home directory most of the disk space so
I created
ls -n /var/www/html/zm/events /home/bpshady2/zm/events
I gave the /home/bpshady2/zm/events
chown -R root:root /home/bpshady2/zm/events
chmod 755 /home/bpshady2/zm/events
I restart ZM and it still does not work. I also looked at the /var/www/html/zm/events and noticed that is has created several linked monitor directories 26,27,28,29 and etc.. I am still having trouble.
What should the permission be on the directories?
I created
ls -n /var/www/html/zm/events /home/bpshady2/zm/events
I gave the /home/bpshady2/zm/events
chown -R root:root /home/bpshady2/zm/events
chmod 755 /home/bpshady2/zm/events
I restart ZM and it still does not work. I also looked at the /var/www/html/zm/events and noticed that is has created several linked monitor directories 26,27,28,29 and etc.. I am still having trouble.
What should the permission be on the directories?
-
- Posts: 7
- Joined: Sun Aug 31, 2008 6:02 pm
It is most definately a permission problem. I checked the /var/log/messages and it says that it cant write to 26 directory which is under /events. I tried giving the directory ownership to apache and when that didnt work then to root. I also checked the /var/log/httpd/error.log and it says "df 'events 'permission denied' " error message. What should I set it too.
/home/bpshady2/zm/events
and
/home/bpshady2/zm/images
?
/home/bpshady2/zm/events
and
/home/bpshady2/zm/images
?
-
- Posts: 7
- Joined: Sun Aug 31, 2008 6:02 pm
-
- Posts: 7
- Joined: Sun Aug 31, 2008 6:02 pm
I finally was able to fix the issue by following what you said and also changing the directive option in /etc/httpd/conf/httpd.conf
http://httpd.apache.org/docs/1.3/mod/core.html#options
but now I cannot see any events when I go under the event number. It doesn't display anything. I can see that the *.jpg are being stored under my new directory /home/bpshady2/zm/events but I am unable to view what event it has captured and it shows the duration of the event as 0:00. What else am I missing?
http://httpd.apache.org/docs/1.3/mod/core.html#options
but now I cannot see any events when I go under the event number. It doesn't display anything. I can see that the *.jpg are being stored under my new directory /home/bpshady2/zm/events but I am unable to view what event it has captured and it shows the duration of the event as 0:00. What else am I missing?
-
- Posts: 100
- Joined: Sat Aug 23, 2008 8:03 pm
-
- Posts: 7
- Joined: Sun Aug 31, 2008 6:02 pm
Many thanks I got it working but I had to do some tweaking. I will explain in steps so that future hobbiest can get the picture.
1 - Assuming that you have zoneminder setup correctly and with a default installation of /var/www/html/zm
2 - Stopped ZM
mv /var/www/html/zm/events /home/bpshady2/zm/events or what ever your mount point is.
ln -s /home/bpshady2/zm/events /var/www/html/zm/events
3 - Check the you can still view existing events both stream and stills. You can do this by
going to the web browser and simply typing:
http://localhost/zm/events
and
http://localhost/zm/images
see if you get a 403 permission error accessing the directory. If so then
stop here and find your permission problem (check all your logs for errors, including Apache)
Looking into Apache I had to change option in the directive via
[url]http://httpd.apache.org/docs/1.3/mod/core.html#options[.url]
once the permission are set correctly you should be able to browse via the instruction above.
Once the previous step works, start ZM.
*** Key Note****
Dont forget that under filters(PurgeWhenFull) is not set by default and you have to tweak it to your satisfaction until you get the desired results. I set it to purge when the system reaches 50%. Also your Zones need to be tweaked so that the cameras are not recording everything when the cameras are set to modetect.
1 - Assuming that you have zoneminder setup correctly and with a default installation of /var/www/html/zm
2 - Stopped ZM
mv /var/www/html/zm/events /home/bpshady2/zm/events or what ever your mount point is.
ln -s /home/bpshady2/zm/events /var/www/html/zm/events
3 - Check the you can still view existing events both stream and stills. You can do this by
going to the web browser and simply typing:
http://localhost/zm/events
and
http://localhost/zm/images
see if you get a 403 permission error accessing the directory. If so then
stop here and find your permission problem (check all your logs for errors, including Apache)
Looking into Apache I had to change option in the directive via
[url]http://httpd.apache.org/docs/1.3/mod/core.html#options[.url]
once the permission are set correctly you should be able to browse via the instruction above.
Once the previous step works, start ZM.
*** Key Note****
Dont forget that under filters(PurgeWhenFull) is not set by default and you have to tweak it to your satisfaction until you get the desired results. I set it to purge when the system reaches 50%. Also your Zones need to be tweaked so that the cameras are not recording everything when the cameras are set to modetect.
I was moving my events folder when I realized that... anyone can just add /events to the url and see all my captured images. That can't be how it is, am i missing something? I could disable the directory listing, but people could try and guess paths...koblow1973 wrote: 3 - Check the you can still view existing events both stream and stills. You can do this by
going to the web browser and simply typing:
http://localhost/zm/events
and
http://localhost/zm/images
thanks