Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[support] dlandon - Zoneminder 1.36

Featured Replies

  • Author
1 hour ago, dmacias said:

What are the write permissions supposed to be for the data directories?
I know the owner is 0:33. I had a problem when I swapped out my data drive for a larger faster drive. I copied all the data from the old drive to the new. The permissions look the same. I checked ls -la in the container (/var/cache/zoneminder) and at /mnt/disks/zoneminder. However zoneminder can't mkdir, permission denied. It couldn't create the new 06 month directory. The top directories in /data (events, images, temp) had 777 but the monitors 01 & 02 had something different. Until I chmod 777 it wouldn't record any events.

The permissions are set when the Docker initially creates the data/ folder and are never changed.  If you copied the folder and the permissions were changed, they would not be corrected by the Docker.  I will take a look at the first run script and see if it might be appropriate to always set the permissions when the Docker is started up and not just when the data/ folder is created.  That would prevent incorrect permissions from being left on the data/ folder.

  • Replies 1.3k
  • Views 300.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I realize that Zoneminder 1.32.0 has been released and I will eventually update the Docker for this new release.  Please don't try to lobby me to update the Docker right away.  I won't update it for a

  • There is an update to the Zoneminder Docker.  This is still version 1.30.4.  I will be working on 1.32 soon. The update included: zmeventnotification updated to v1.6.  The zmeventnotificati

  • Map an external port to the Zoneminder docker port 80.

Posted Images

  • Author

The data/ permissions are corrected every time the docker is started in the latest docker build.

4 hours ago, dlandon said:

The data/ permissions are corrected every time the docker is started in the latest docker build.

I'm not sure what was wrong with the permissions. The owner was correct and the write permissions were drwxr-xr-x. The only problem I see is, if there are a ton of events it could take a while for the docker to start since the data directory is chmod and then chown. I had a ton of events and was using an xfs partition. It took more than 20 minute to start. I wiped the events and formated the drive to ext4. I don't think anything needs to be fixed. Just sharing my experience.

  • Author

So you are saying that the chmod and chown permissions settings took 20 minutes to apply when the docker started?  If this is true, then my change to apply the permissions when the docker is started is not a good idea.

 

EDIT: The permissions applied by the docker are:

Quote

chmod go+rw

 

Edited by dlandon

  • Author

I don't know if you had a filter set up to remove older events, but I set up a 30 day filter so the events don't grow to an unreasonable amount.  The default filter setting of 50% of the disk space used is not appropriate in the unRAID environment.  This is the filter I use:

5943a0892f36b_Purgesettings.png.6e01171a6d94fa0f5ec91487d77fed65.png

 

This limits the events to 30 days worth.

So you are saying that the chmod and chown permissions settings took 20 minutes to apply when the docker started?  If this is true, then my change to apply the permissions when the docker is started is not a good idea.
 
EDIT: The permissions applied by the docker are:
chmod go+rw
 

Thanks. I figured that out from the run script on your github. Yes it was taking that long, even when I ran the chmod and chown from the unRAID command line also. I purged all the events and switch to ext4. I also increased my post buffer (15sec x 20fps) a bit more to get longer/less events. May need to adjust sensitivity. Thanks for the filter suggestion. I left the purgewhenfull but have it set to 75 (in case the hard drive gets full). I created a separate filter PurgeByAge using -14 days.
  • Author

Based on your feedback, I have redone the docker to set permissions and ownership only when the data/ directories are initially created.  The downside to this is that if the permissions and/or ownership change, Zoneminder would have the problem you had.  Any kind of copying of the data would have to preserve the ownership and permissions.

 

I have moved my data/ storage to the array into a separate share.  While this works fine, if the 'New Permissions' script was run on the share I set up for Zoneminder, the permissions would be changed, potentially messing up Zoneminder.

7 hours ago, dlandon said:

Based on your feedback, I have redone the docker to set permissions and ownership only when the data/ directories are initially created.  The downside to this is that if the permissions and/or ownership change, Zoneminder would have the problem you had.  Any kind of copying of the data would have to preserve the ownership and permissions.

 

I have moved my data/ storage to the array into a separate share.  While this works fine, if the 'New Permissions' script was run on the share I set up for Zoneminder, the permissions would be changed, potentially messing up Zoneminder.

Did you get the same delay on chmod or chown? I might of just had way more events than normal use or too many small files.

 

You could use something like this to check permissions in the firstrun script if they've changed

stat -c '%u%g' /var/cache/zoneminder/ == '033' or
stat -c '%U%G' /var/cache/zoneminder/ == 'rootwww-data'
stat -c '%a' /var/cache/zoneminder/events/ == 777 or 755 whatever the value is supposed to be

 

 

  • Author
50 minutes ago, dmacias said:

Did you get the same delay on chmod or chown? I might of just had way more events than normal use or too many small files.

 

You could use something like this to check permissions in the firstrun script if they've changed

stat -c '%u%g' /var/cache/zoneminder/ == '033' or
stat -c '%U%G' /var/cache/zoneminder/ == 'rootwww-data'
stat -c '%a' /var/cache/zoneminder/events/ == 777 or 755 whatever the value is supposed to be

 

 

 

Let me look into that.  That's not a bad idea.

  • Author
3 hours ago, dmacias said:

Did you get the same delay on chmod or chown? I might of just had way more events than normal use or too many small files.

 

I don't have a lot of events, so I did not notice any delay.

 

I added a permission check and if not correct, the permissions are corrected.

 

While you had an unusual case, I like the idea of the docker correcting the permissions if they are not correct.

  • 2 months later...

I have a control script (PTZ) that is supposed to be placed in this folder

 

/usr/share/perl5/ZoneMinder/Control

 

Where would I put this script within /mnt/user/appdata/zoneminder?

  • Author
15 hours ago, surfshack66 said:

I have a control script (PTZ) that is supposed to be placed in this folder

 

/usr/share/perl5/ZoneMinder/Control

 

Where would I put this script within /mnt/user/appdata/zoneminder?

That folder is in the docker image.  You would have to put the script there.

 

EDIT: Is this a typical situation for a PTZ camera?  If so then I could add a folder to the appdata/Zoneminder for these scripts to be copied into the docker image.

Edited by dlandon

  • Author
On 8/24/2017 at 2:23 PM, surfshack66 said:

I have a control script (PTZ) that is supposed to be placed in this folder

 

/usr/share/perl5/ZoneMinder/Control

 

Where would I put this script within /mnt/user/appdata/zoneminder?

I have added a 'control' folder in '/appdata/Zoneminder/' where you can put the PTZ control script.  It will be copied to the '/usr/share/perl5/ZoneMinder/Control' folder in the docker image with the proper permissions set.

On 8/26/2017 at 10:44 AM, dlandon said:

I have added a 'control' folder in '/appdata/Zoneminder/' where you can put the PTZ control script.  It will be copied to the '/usr/share/perl5/ZoneMinder/Control' folder in the docker image with the proper permissions set.

Awesome! Thanks @dlandon.

 

 

I just installed this docker and all I get is the Apache default page. Any guidance?

  • Author
20 minutes ago, flippedcracker said:

I just installed this docker and all I get is the Apache default page. Any guidance?

How are you trying to get to the Zoneminder UI?

by going to the ip of my server with port attached

I see now. I had to add /zm to the end

  • Author
Just now, flippedcracker said:

I see now. I had to add /zm to the end

Yes.  Or left click on the Zoneminder Docker icon and select 'WebUI'.

Where are the records store? Can I give zm a parth in edit and change to store my record in example  Share/ZoneMiner/events/ on my Array?

nr1.png

 

EDIT - /mnt/user/ZoneMinder is a share I create in the Array.

But if the records now are store on the array the problem solved :) 

Edited by stormense

  • Author
3 hours ago, stormense said:

Where are the records store? Can I give zm a parth in edit and change to store my record in example  Share/ZoneMiner/events/ on my Array?

nr1.png

 

nr2.png

But if the records now are store on the array the problem solved :) 

Are you using the dlandon Zoneminder Docker?  The template you are showing does not appear to be for this Zoneminder Docker, but the same principals apply.

 

You can do what you want, but you are not doing it correctly.  Leave the "Directory where events are stored" setting in the Zoneminder configuration to "events".  You set the path where the data is stored in the Docker template.

5 hours ago, dlandon said:

Are you using the dlandon Zoneminder Docker?  The template you are showing does not appear to be for this Zoneminder Docker, but the same principals apply.

 

You can do what you want, but you are not doing it correctly.  Leave the "Directory where events are stored" setting in the Zoneminder configuration to "events".  You set the path where the data is stored in the Docker template.

Yes I use dlandon Zoneminder:

nr3.png

Tanks, it works, was hide under advance settings. Now the cash disk don't run out of space. 

 

nr4.png

 

Here a video on my success 

 

 

Edited by stormense

  • 2 weeks later...
  • Author

I was asked to add the php-curl package to the Docker for this script:

https://forums.zoneminder.com/viewtopic.php?f=9&t=25499&p=102289#p97465

It looks like it changes the cameras to Modect when you are away from home and back to Monitor when back home.  I don't know if this is interesting to anyone here, but let me know and I'll see about including the script in the Docker.

  • 2 weeks later...
On 9/15/2017 at 2:03 PM, dlandon said:

I was asked to add the php-curl package to the Docker for this script:


https://forums.zoneminder.com/viewtopic.php?f=9&t=25499&p=102289#p97465

It looks like it changes the cameras to Modect when you are away from home and back to Monitor when back home.  I don't know if this is interesting to anyone here, but let me know and I'll see about including the script in the Docker.

2

 

Hi, I'm just barely getting started with zoneminder and need a bit of help.  I am trying to set up cron in zm to automatically change the state at specific times.  This is from this page: http://www.adeptus-mechanicus.com/codex/contrib/ro-zmind/ro-zmind.html

 

Quote

Then to save the state, give it a nice descriptive name in the New Status: field, like, oh, I don't know, for example if you had a motion detector going, typing in “motiondetect” then click save, this then saves the state. Now, log onto your zoneminder box by using ssh. You will now edit crontab so that your recently saved run state will start up at a certain time. Now, once logged on, issue..

crontab -e


which will start up the crontab editor. Then edit this just like you would use vi, (vi is a linux command prompt text editor, I'm not covering that either) I will show you an example of a crontab file..

0 8 * * 1-5 /usr/local/bin/zmpkg.pl Monitor 
0 17 * * 1-5 /usr/local/bin/zmpkg.pl Detection 
* * * * 0,6 /usr/local/bin/zmpkg.pl Detection
4

 

Is this related to what you are asking about adding the php-curl package?  If so, is the php-curl package needed for what I'm trying to do?  If not, should I be able to set up the cron changes above without add it?

 

My eventual goal is to figure out a way to record using motion detection during certain hours, but not the hours I'm normally home.  I would also really like to be able to easily turn off recording  during the times I'm home "off hours".

 

Thanks for all your work on this!

Scott

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.