Looks like it is permission issue with the path, Try setting a path and adding the filename to the end of it. On Docker using /tmp/filename.json should work.
I suspect it will be trying to write to /data/filepath.json which would be owned by root and not the node user, If you add an execute command node you can try running the commands below one at a time to find out what the working directory is, What user you are and then try to make an empty file which will likely return the same error.
It’s not the very same error reported, but it’s a permission error as well and could possible be the same. What can I do to fix it? From my understanding the user inside the docker container doesn’t need to exist on the host, or am I wrong about that?
There isn’t really anything to fix there, So the /data directory will be owned by root and we don’t recommend storing data there. Normally we would suggest mapping a volume from the host to the container so that your data can be retrieved if needed it also gives you some space to work with files.
I wouldn’t mess with the /data path so it could be worth just adding another mapping like…
- ./data/files:/files
Then you can prefix the path with /files/, You could try messing around with the permissions inside the container to change the owner of the /data folder but it is probably best to avoid that as an upgrade would likely revert it so the volume will be safer.