failed to create file: Error: EACCES: permission denied, mkdir

Hello I have a problem of permission with nodered docker in my flow.json I have a file node that should create a txt file for me to save info but I have this message: failed to create file: Error: EACCES: permission denied, mkdir Can someone help me?

Welcome to the forum @vb70.exe

Are you using Docker for a reason? It can make life more difficult.

What path are you trying to save it too? You can't directly access the host file system from Docker apps, you have to set up a Docker volume to map the Docker system to the host.

1 Like

Thanks you @Colin,
Yes it is important to use a nodered container for this project. And yes i created a volume that I mapped to the container -v datanodecollect:/data but the file node must create the file in a directory /home/imako/tests.
How do I point the file node to the dedicated volume of the nodered container?

Point it to the container internal folder that you have mapped to the tests folder.

My question is How can I get the file node (node:file) to store itself in the volume?

If, for example you map the docker volume /Tests to the host file system folder /home/imako/tests then in the file node to write to the file /home/imako/tests/somefile you use /Tests/somefile.

Further reading on creating a Docker volume for people like me who encountered this error and had no idea what a Docker volume is or larger implications (or even just how to setup) - link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.