Hello,
i am very new and I hope someone can help me. I am using a Linux system with IO-Broker and Node-Red. Everything is running on the newest version. I created a ".json" on my linux system under "/home/user/x.json". I am trying to read the file inside Node-Red and I am always getting the following fault: "Error: EACCES: permission denied, open '/home/user/x.json'".
I did not find any solution in the internet. It always seem to be another "EACCES" fault. I hope someone can help me out?
My target is to read a .json file and use the information in node-red.
Is node-red running in a Docker container? If so then probably it does not have access to that part of the file system. I avoid docker whenever possible, it can make life difficult,
If it is not running in a container (I don't know anything about iobroker) then that suggests that the user running node red does not have read access to the folder. What does this command show ls -l /home/user/x.json
Is it actually user or are you just showing us that rather than the user name?
Yes, that means full access rights to anyone, which is odd. I don't know enough about io broker or io broker adapters to know how node red is installed and run to be sure what to do next. If there is an io broker forum I suggest you ask there.
I still suspect that node-red is running inside a container. What does this command show? which node-red
I typed "which node-red" in my terminal. Nothing happened.
I ran the command in my terminal under /opt/iobroker/iobroker-data/node-red and nothing happened.
Or what do you mean? My node-red version is v4.0.3.
Thank you for your help. I am really stuck here.
As a workaround, can you put the file under the directory where the node-red flow file is stored? It must have access to that area. Hopefully you know where that is in order to backup your flows file.
The flow files might not be (directly) on a file system - they may be in a database or accessed via an endpoint (storage is pluggable, FlowFuse does this)