dlandon Posted June 15, 2017 Author Share Posted June 15, 2017 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. Quote Link to comment
dlandon Posted June 15, 2017 Author Share Posted June 15, 2017 The data/ permissions are corrected every time the docker is started in the latest docker build. Quote Link to comment
dmacias Posted June 16, 2017 Share Posted June 16, 2017 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. Quote Link to comment
dlandon Posted June 16, 2017 Author Share Posted June 16, 2017 (edited) 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 June 16, 2017 by dlandon Quote Link to comment
dlandon Posted June 16, 2017 Author Share Posted June 16, 2017 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: This limits the events to 30 days worth. Quote Link to comment
dmacias Posted June 16, 2017 Share Posted June 16, 2017 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. Quote Link to comment
dlandon Posted June 17, 2017 Author Share Posted June 17, 2017 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. Quote Link to comment
dmacias Posted June 17, 2017 Share Posted June 17, 2017 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 Quote Link to comment
dlandon Posted June 17, 2017 Author Share Posted June 17, 2017 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. Quote Link to comment
dlandon Posted June 17, 2017 Author Share Posted June 17, 2017 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. Quote Link to comment
surfshack66 Posted August 24, 2017 Share Posted August 24, 2017 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? Quote Link to comment
dlandon Posted August 24, 2017 Author Share Posted August 24, 2017 (edited) 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 August 25, 2017 by dlandon Quote Link to comment
dlandon Posted August 26, 2017 Author Share Posted August 26, 2017 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. Quote Link to comment
surfshack66 Posted August 31, 2017 Share Posted August 31, 2017 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. Quote Link to comment
flippedcracker Posted August 31, 2017 Share Posted August 31, 2017 I just installed this docker and all I get is the Apache default page. Any guidance? Quote Link to comment
dlandon Posted August 31, 2017 Author Share Posted August 31, 2017 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? Quote Link to comment
flippedcracker Posted August 31, 2017 Share Posted August 31, 2017 by going to the ip of my server with port attached Quote Link to comment
flippedcracker Posted August 31, 2017 Share Posted August 31, 2017 I see now. I had to add /zm to the end Quote Link to comment
dlandon Posted August 31, 2017 Author Share Posted August 31, 2017 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'. Quote Link to comment
stormense Posted September 5, 2017 Share Posted September 5, 2017 (edited) 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? 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 September 5, 2017 by stormense Quote Link to comment
dlandon Posted September 5, 2017 Author Share Posted September 5, 2017 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? 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. 1 Quote Link to comment
stormense Posted September 5, 2017 Share Posted September 5, 2017 (edited) 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: Tanks, it works, was hide under advance settings. Now the cash disk don't run out of space. Here a video on my success Edited September 5, 2017 by stormense Quote Link to comment
dlandon Posted September 15, 2017 Author Share Posted September 15, 2017 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. Quote Link to comment
scott47 Posted September 28, 2017 Share Posted September 28, 2017 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 Quote Link to comment
Recommended Posts
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.