Trouble giving a Jail RW Access to Storage

arretx

Cadet
Joined
Feb 20, 2021
Messages
4
I've installed the Zoneminder plugin in Truenas. It works, no problems.

I stopped the plugin and added a mount point.

By default, it seems that Zoneminder's video events and images land in `/var/db/zoneminder/events` and `/var/db/zoneminder/images`.

My preference is to have that data land on my main storage. My System Dataset Pool is named `Marvel`. Under that are `iocage` and `Superhero`.

Under `Superhero` I have `Ironman` and `Thor`. `Ironman` is where my main file share is for all of my crap. Using Samba on my Mac, I've created a sub-folder in `Ironman` to hold events from Zoneminder.

Here are the Steps I took:

  1. Using Zoneminder shell, ensure zoneminder's data path is empty so I can mount it. I did that by first removing any capture devices from the console, then confirming the folder is empty.
  2. Stop Zoneminder Jail
  3. Click Mount Points --> Action Add
  4. Source = /mnt/Marvel/Superhero/Ironman/inboundFamilyMedia/zoneminder
  5. Destination = /mnt/Marvel/iocage/jails/zoneminder/root/var/db/zoneminder/events

From the Jail's shell prompt, I can read and write to the mount point and I can confirm it because I see the folders and files from my Mac. However, it seems that Zoneminder isn't writing any data to the location and it was writing data to the default location prior to mounting it remotely.

What should I look at at this point?
 

arretx

Cadet
Joined
Feb 20, 2021
Messages
4
Update! Okay, it's definitely a user permission problem. As I'm logged in as root in the Zoneminder shell, I can access the share, but the Zoneminder error log is showing that the "web account user" needs to own this folder?

Checking the /etc/passwd file reveals a user called www. I'm presuming I need to chown the events folder and make www the owner and then set the ACL permissions for my user so I can still see the data on my Mac...yes?
 

davidh3f

Dabbler
Joined
Oct 18, 2020
Messages
14
I am playing around with zoneminder on TrueNAS as well and came across your post due to the same permission issue. I changed the dataset permission to www for both the user and the group, which solved the problem - thanks to your hint above.
 
Top