Closed d-amend closed 2 years ago
Because this package supports e2e encryption we need to store the encryption keys on the machine running Node-RED. It looks like the package is trying to create the directory /matrix-client-storage
within the Node-RED folder and it is failing because of permission issues. This folder is where all the e2e data (as well as already received messages, room data, etc) is stored and is required for the bot to function correctly.
node-red-contrib-matrixbot
works because it doesn't create this directory. It downloads all the data it needs at run time which is inefficient.
Does the user running Node-RED have access to create/modify files within it's directory?
Also, are you running Node-RED directly on the system or running it in a docker container?
Thanks, Skylar Sadlier
@d-amend did you ever get this resolved?
Good, that you asked. Thank you! Sorry, for my late reply. It is not solved :/
But to answer your questions:
Does the user running Node-RED have access to create/modify files within it's directory? Yes. The folder
/var/db/nodered
where Node-RED is installed is owned by the usernodered
who also runs the server.
Also, are you running Node-RED directly on the system or running it in a docker container?
Node-RED is running in a BSD jail which can compare to a chroot on Linux. So I have direct shell access and can try out things, but is isolated from the host system. So there should not be any side effects from other packages.
What I tried: I created the directory /var/db/nodered/matrix-client-storage
. This doesn't change anything. It is the right place, though? I checked your code and came to the conclusion that you try to created it exactly there. From the log messages I was not sure because they give no absolute path where the dir should be located. But it doesn't change anything.
Here is screenshot of the nodered dir of my test setup (after I created /matrix-client-storage
manually):
I think I figured this out. I'm working on another update to fix this. I'll let you know when it's available :)
Oh, that are really great news!! I am looking forward to it!
@d-amend Just released 0.4.6
which should fix this for you. Give it a try and let me know.
Thanks :)
It works!!! Thank you very much. We will switch to your plugin <3
Everytime I try to use one of the Nodes on FreeBSD (TrueNAS jail - TrueNAS-12.0-U7) I get the message
"Error: EACCES: permission denied, mkdir '/matrix-client-storage'"
in the Debugger.I use a own Matrix home server, not matrix.org
What I already tried:
node-red-contrib-matrixbot
and same server: no problemnode-red-contrib-matrix-chat
: got the same errorI would guess, that it is a permission problem, that just happens on FreeBSD. My short investigations didn't lead to any success.
Any ideas what I can try or how I can find the bug?