Cannot write to event folder

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
enry86cami
Posts: 3
Joined: Sun Oct 13, 2024 10:55 am

Cannot write to event folder

Post by enry86cami »

Hi all,
from web gui in option->storage in have added a mounted folder where I want to save my events:

Code: Select all

Id	Name	Path	Type	Scheme	Server	DiskSpace	Events	Mark
1	Default	/var/cache/zoneminder/events	local	Medium		3.80GB of 7.78GB	3 using 102.12MB	
3	USBSSD	/home/USBSSD	local	Medium		7.01GB of 465.75GB	235 using 4.51GB
all the cameras "storage area" is set to "USBSSD" and everything works.

But in the log I have this:

Code: Select all

web_php		1012	WAR	Cannot write to event folder /home/mnt_nas_nvr. Check that it exists and is owned by the web account user.
"/home/mnt_nas_nvr" was and old storage location that I removed...
What can I check to remove definitively this storage path?

Many thanks
User avatar
burger
Posts: 437
Joined: Mon May 11, 2020 4:32 pm

Re: Cannot write to event folder

Post by burger »

It's in the database: https://wiki.zoneminder.com/MySQL.

For others who find this post looking for file system assistance see: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
enry86cami
Posts: 3
Joined: Sun Oct 13, 2024 10:55 am

Re: Cannot write to event folder

Post by enry86cami »

burger wrote: Mon Oct 14, 2024 10:20 pm It's in the database: https://wiki.zoneminder.com/MySQL.

For others who find this post looking for file system assistance see: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
Sorry but I checked but I don't know how to remove the old path, could you help me?
User avatar
burger
Posts: 437
Joined: Mon May 11, 2020 4:32 pm

Re: Cannot write to event folder

Post by burger »

It's a standard SQL command. Something like:

Code: Select all

sudo mysql -u root zm
show tables;
select * from Storage;
(see what mount is the one you are looking for)
delete from Storage where Id=<idthathasthemountyouwant>;
select * from Storage;
(review changes look correct)
And restart ZM afterwards.

Note that you should generally not run DB SQL commands like this, because there is always a chance you will break some dependency. Make a database backup first, in case something goes wrong. The message you are seeing in the logs is a warning, and you can ignore it if you want.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
enry86cami
Posts: 3
Joined: Sun Oct 13, 2024 10:55 am

Re: Cannot write to event folder

Post by enry86cami »

Image

This is what I see in SQL
User avatar
burger
Posts: 437
Joined: Mon May 11, 2020 4:32 pm

Re: Cannot write to event folder

Post by burger »

Well, I know the Monitor table references the Storage table only by Id, so it must be stored somewhere else. Try:

Code: Select all

mysqldump -u myuser --no-create-info --extended-insert=FALSE databasename | grep -i "<search string>"
or
mysqldump -u root  --no-create-info --extended-insert=FALSE zm | grep -i "mnt_nas_nvr"
from https://stackoverflow.com/questions/562 ... l-database

Or, maybe you have the /home/mnt_nas_nvr set in the /etc/zm/ folder? Look at /etc/zm/conf.d/01-system-paths.conf.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Post Reply