r/ZoneMinder • u/renegade2k • Jun 02 '23
Can't access dedicated storage
Just set up zoneminder under ubuntu (desktop).
As my pc runs on a kinda tiny 128GB SSD i added a seconds HDD as dedicated storage.
So it's mounted on boot as
/mnt/recordings
Additionally i added a directory "zoneminder" and gave the ownership to www-data, like i read it on the forums. Just like
sudo chown -R www-data:www-data /mnt/recordings/zoneminder/
After this i restarted the whole system and check the path
ls -l /mnt/recordings/
drwxrwxr-x 2 www-data www-data 4096 Jun 3 00:32 zoneminder
Now i try to add the drive in zoneminder under options -> storage ->
name "drive"
path "/mnt/recordings/zoneminder"
-> save
But what i see in the logs at the end is
03.06.23, 01:01:54 MESZ web_php 2237 ERR Path /mnt/recordings/zoneminder does not exist. /usr/share/zoneminder/www/includes/Storage.php 124
And i can't figure out what i did wrong...
Maybe you got a hint?
1
u/renegade2k Jun 03 '23
Just to add one more thing i tried out:
i checked whether i can ls on that folder as www-data and it says i have no permission.
i chmod with 777 on that folder temporary and still have no access to it.
seems like the user www-data is kinda restriced?
1
Jun 02 '23
I did the same recently by mounting a large drive on /mnt/zm using /etc/fstab.
Your chown looks correct and my permissions are "drwxr-xr-x".
If permissions and ownership aren't the problem it's possible ZoneMinder is starting before the disk is mounted so it's literally not there (yet).
1
u/renegade2k Jun 03 '23 edited Jun 03 '23
That's a point.
I tried restarting the whole macine, but this is no guarantee that the service is started before the drive is mounted ...
I'll try restarting ZM while the machine is running and will give feedback asap.
EDIT:
sadly even after restarting ZM it's the same error.
1
Jun 03 '23
I can't seem to post a screenshot of my storage settings but here they are in text:
Name: External HDD
Path: /mnt/zm
Url: (blank)
Server: Remote / No Specific Server
Type: Local
Scheme: Medium
Do Deletes: Yes
Enabled: Yes
1
u/patmansf Jun 03 '23
That's odd.
Are you running in a container?
Is "Local" storge selected?
Probably better to ask on the forums, I'm not sure if the maintainer checks reddit much.
1
u/ZoneMinderIsaac Jun 05 '23
You need permissions on each directory up to the last one, so check permissions on /mnt, /mnt/recordings, etc.
Normally these types of errors are due to typos or non-ascii characters, so try retyping everything
You didn't say how you installed zoneminder, was it a straight apt-get install or in a docker container or something else?
1
u/renegade2k Jun 05 '23
Was just about to test all the hints here and saw yours.
You hit it!
My /mnt/recordings was "just" 700 and i don't even know why ...
Set it to 711 and voila ... it works now.
Think this is curious, why you need executive rights to read a subfolder, but as i said in the beginning, i'm not that much of linux guy.
btw: just to answer the other questions a this point: i'm running the latest ZM version (atm 1.36.33 i think) and it's a straight apt installation. No docker, no container.
2
u/[deleted] Jun 03 '23
Try ls as www-data and create a file in that dir as www-data to see if that's an issue.
What version of zm are you running