problem with changing PATH events

Forum for questions and support relating to the 1.24.x releases only.
Locked
piratebab
Posts: 6
Joined: Sat Apr 10, 2010 8:36 am

problem with changing PATH events

Post by piratebab »

Hello,
I am new with zm. My system works like a charm (debiam testing, zm 1.24.2 frpm debain repository).
I want to change the directory used by zm to store file.
So I created
/home/piratebab/zm/events
/home/piratebab/zm/events

I filled them with /var/cache/zoneminder, and of coarse change the DIR_EVENTS and DIR_IMAGES using firefox.
I restart zm (and also try to reboot).
The new events and images are now stored at the right place, but I am not able to visualise them.
Do I miss something ?
MarcoP
Posts: 46
Joined: Wed Mar 24, 2010 1:46 pm

Post by MarcoP »

Did you check the folder permissions?
The web server's user should be able to read, execute and write those paths.
piratebab
Posts: 6
Joined: Sat Apr 10, 2010 8:36 am

Post by piratebab »

Thanks for yor answer.
the directory belongs to www-data, and write works. i can see the events in the dirctory. But when I want to view them using sm and firefox, it fails (work great with default PATH)
MarcoP
Posts: 46
Joined: Wed Mar 24, 2010 1:46 pm

Post by MarcoP »

Code: Select all

ls -l /home/piratebab | grep zm > /home/piratebab/perms.txt
ls -l /home/piratebab/zm | grep events >> /home/piratebab/perms.txt
Now open /home/piratebab/perms.txt and post here the content.
piratebab
Posts: 6
Joined: Sat Apr 10, 2010 8:36 am

Post by piratebab »

The important parts are:
drwxr-xr-x 4 4096 avril 10 09:46 zoneminder
and
drwxr-xr-x 4 www-data www-data 4096 avril 8 07:53 events
As I said, it is not a write problem, but I can not view the images nor video in firefox if I change the directory.
piratebab
Posts: 6
Joined: Sat Apr 10, 2010 8:36 am

Post by piratebab »

Is it OK ?
piratebab
Posts: 6
Joined: Sat Apr 10, 2010 8:36 am

Post by piratebab »

I have created symlinks, and it is OK now
marcio123
Posts: 10
Joined: Sun Feb 21, 2010 5:14 pm

Post by marcio123 »

Hello,

I want to store my events and images on

/media/1/images
and
/media/1/events

so I have changed it in browser but it doesn't work :(

What more should I do ?


[EDIT] I have changed permitions for /media/1 and it worked but now I have another problem. When I want to see my pictures in web browser (events-eventname- stills) it only shows /zm/graphics/transparent.gif. What should I do to see them ?




piratebab wrote
"I filled them with /var/cache/zoneminder"
how can I do it ?
Marcin Stępień
Marcin Stępień - Cieszyn
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Post by moorsey »

I am having the same issue, have read a few posts but have seen no conclusive answer on simply moving the events dir

What I did:

Moved the events, images and temp directories from /var/cache/zoneminder to my second hard drive

Created symlinks in /var/cache/zoneminder to point to the new drive folders

ls -s /media/zoneminder/zoneminder/events /var/cache/zoneminder

Same for the other two

When this is done, all permissions are correct, Zoneminder does not record new events, just zero length entries and no old entries are viewable.

Am currently running a chmod 777 -R on the new Zoneminder folder to see if this changes anything
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Post by moorsey »

well, no changes, still failing, full permissions, guess it must be the symlink that is the issue?!
marcio123
Posts: 10
Joined: Sun Feb 21, 2010 5:14 pm

Post by marcio123 »

You have to check two things

1)
I have made both (dont know which one is correct)
ln -s /media/VIDEO/events usr/share/zoneminder/events
ln -s /media/VIDEO/events var/cache/zoneminder/events

2) try to do ln -s to zoneminder/events

hope it helps
write if it did... (or didn't ;) )
Marcin Stępień
Marcin Stępień - Cieszyn
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Post by moorsey »

thanks for the tips!

Have also added the symlinks to /usr/share/zoneminder

Still getting the following error:

Code: Select all

Jun 23 17:23:26 ZONEMINDER1 zms[13273]: ERR [Can't open /usr/share/zoneminder/events/3/12682/001-capture.jpg: Permission denied]
Here is the permission read out from my media directory:

Code: Select all

root@ZONEMINDER1:/media/zoneminder/zoneminder# ls -l
total 12
drwxrwxrwx 8 777 www-data 4096 2010-06-22 07:14 events
drwxrwxrwx 2 777 www-data 4096 2010-06-12 12:55 images
drwxrwxrwx 2 777 www-data 4096 2010-04-12 15:22 temp
Sorry, not sure what you mean with step 2, zoneminder/events?

Cheers again, will get this cracked!
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Post by moorsey »

Also, ls -l from inside the events folder, if someone could compare it with theirs, would be great:

Code: Select all

root@ZONEMINDER1:/media/zoneminder/zoneminder/events# ls -l
total 396
drwxrwxrwx 1708 777 www-data  36864 2010-06-21 07:35 2
drwxrwxrwx 4077 777 www-data  69632 2010-06-20 22:21 3
drwxrwxrwx 6560 777 www-data 126976 2010-06-21 02:55 4
drwxrwxrwx 1824 777 www-data  36864 2010-06-21 07:35 5
drwxrwxrwx 2952 777 www-data  69632 2010-06-21 07:35 6
drwxrwxrwx 2327 777 www-data  61440 2010-06-21 07:37 7
lrwxrwxrwx    1 777 www-data     24 2010-06-22 15:53 events -> /media/zoneminder/events
lrwxrwxrwx    1 777 www-data      1 2010-06-22 15:59 Monitor-1 -> 2
lrwxrwxrwx    1 777 www-data      1 2010-06-22 18:52 Monitor-2 -> 3
lrwxrwxrwx    1 777 www-data      1 2010-06-22 15:53 Monitor-3 -> 4
lrwxrwxrwx    1 777 www-data      1 2010-06-22 15:41 Monitor-4 -> 5
lrwxrwxrwx    1 777 www-data      1 2010-06-22 15:53 Monitor-5 -> 6
lrwxrwxrwx    1 777 www-data      1 2010-06-22 17:28 Monitor-6 -> 7
marcio123
Posts: 10
Joined: Sun Feb 21, 2010 5:14 pm

Post by marcio123 »

Where in zoneminder do You have error log ??

Show me ls -l in usr/share/zoneminder

It all should look like this ...

Code: Select all

/usr/share/zoneminder$ ls -l
razem 48
drwxr-xr-x 2 root root 4096 2010-04-01 21:46 ajax
lrwxrwxrwx 1 root root   17 2010-04-01 21:46 cgi-bin -> ../../lib/cgi-bin
drwxr-xr-x 2 root root 4096 2010-04-01 21:46 css
drwxr-xr-x 2 root root 4096 2010-04-01 21:46 db
lrwxrwxrwx 1 root root   20 2010-06-14 13:02 events -> /media/VIDEO/events/

Code: Select all

/media/VIDEO$ ls -l
razem 20
drwxrwxrwx 8 marcin marcin  4096 2010-06-23 20:06 events
drwx------ 2 root   root   16384 2010-06-23 18:44 lost+found

Code: Select all

media$ ls -l
drwxrwxrwx 4 marcin marcin 4096 2010-06-23 19:58 VIDEO
to do it You should :

Code: Select all

ln -s /media/VIDEO/events /usr/share/zoneminder/events
mkdir /media/VIDEO/events
chmod 777 /media/VIDEO
chmod 777 /media/VIDEO/events
You wrote :

Code: Select all

root@ZONEMINDER1:/media/zoneminder/zoneminder/events# ls -l
total 396
drwxrwxrwx 1708 777 www-data  36864 2010-06-21 07:35 2
drwxrwxrwx 4077 777 www-data  69632 2010-06-20 22:21 3
drwxrwxrwx 6560 777 www-data 126976 2010-06-21 02:55 4
drwxrwxrwx 1824 777 www-data  36864 2010-06-21 07:35 5
drwxrwxrwx 2952 777 www-data  69632 2010-06-21 07:35 6
drwxrwxrwx 2327 777 www-data  61440 2010-06-21 07:37 7
lrwxrwxrwx    1 777 www-data     24 2010-06-22 15:53 events -> /media/zoneminder/events
I think it is not correct. On mounted zoneminder You made link to the same partition (?). It looks strage ...
Marcin Stępień
Marcin Stępień - Cieszyn
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Post by moorsey »

ls -l in usr/share/zoneminder

Code: Select all

root@ZONEMINDER1:/media/zoneminder/zoneminder/events# ls -l /usr/share/zoneminder
total 48
drwxr-xr-x 2 root root 4096 2010-06-06 15:59 ajax
lrwxrwxrwx 1 root root   17 2010-06-06 15:59 cgi-bin -> ../../lib/cgi-bin
drwxr-xr-x 2 root root 4096 2010-06-06 15:59 css
drwxr-xr-x 2 root root 4096 2010-06-06 15:59 db
lrwxrwxrwx 1 root root   35 2010-06-23 17:22 events -> /media/zoneminder/zoneminder/events
drwxr-xr-x 2 root root 4096 2010-06-06 15:59 graphics
lrwxrwxrwx 1 root root   35 2010-06-23 17:22 images -> /media/zoneminder/zoneminder/images
drwxr-xr-x 2 root root 4096 2010-06-06 15:59 includes
-rw-r--r-- 1 root root 3717 2010-04-12 15:22 index.php
drwxr-xr-x 2 root root 4096 2010-06-06 15:59 js
drwxr-xr-x 2 root root 4096 2010-06-06 15:59 lang
drwxr-xr-x 4 root root 4096 2010-06-06 15:59 skins
drwxr-xr-x 2 root root 4096 2010-04-12 15:22 sounds
lrwxrwxrwx 1 root root   33 2010-06-23 17:22 temp -> /media/zoneminder/zoneminder/temp
drwxr-xr-x 3 root root 4096 2010-06-06 15:59 tools
drwxr-xr-x 2 root root 4096 2010-04-12 15:22 views
Ignore the last line on my last post

Code: Select all

lrwxrwxrwx    1 777 www-data     24 2010-06-22 15:53 events -> /media/zoneminder/events
It was a left over symlink from me messing!

My "zoneminder" directory in "media" is the equivalent of your "VIDEO" directory, so all the symlinks seem the same there.



WOOOAHHH, cancel all of the above!!!!

I just ran the following from your last post

chmod 777 /media/zoneminder
chmod 777 /media/zoneminder/zoneminder
chmod 777 /media/zoneminder/zoneminder/events

No idea which one fixed it, but must have been one of the top level directories, as I had deffo changed the permissions on everything else.

Thank you so much marcio for getting me in the right direction! I can now view old events and see new events being recorded, great

Thanks!!
Locked