On the left side there are some ‘storage’ nodes - write file, read file, watch.
I am trying to use the ‘write file’ node to write some debug messages to a file - so I can use filebrowser to view the file/data.
The issue is that I can only save files to the ‘/data’ directory, anything else gets a “failed to append to file: Error: EACCES: permission denied, open ‘/data/debug/db3’” - in this case I used filebrowser to create a new directory in /data (which worked) and tried to generate a new file in that directory using Node red (which did not work).
Initially I thought that the issue was with Node red, but it could also be an ihost permissons issue - not sure if its at a user or app level - or something else entirely.
Ideally I would like to write files to a seperate volume, to keep my mess seperate. At the moment everything is going into ‘node-red-files’ (using filebrowser).
Hi Teki
I used filebrowser to create a directory and could not create a file in there using Node red.
Your example had an extra level (db3), so I tried to replicate it. However, rather than use filebrowser to generate the filesystem (/data/debug/db3) and then use Node red to create the file (test.txt), I selected the ‘create directory if it doesn’t exist’ put in the path (/data/debug/db3/test.txt).
It worked fine . So from now on use filebrowser to browse the files, NOT create them. Create directory/files from Node red.
It must be a permissions thing?
Was there any progress on this issue because I am also getting a permissions error when I try and create a file from node-red in iHost, where can I have a sample or better directions how to use “File” in Node-Red on iHost and what is the path and directory where you should create a json file for logging purposes, how do you address a new volume you created and create a file and then write to the file.
I am having a problem , permissions error when I try and create a file from node-red in iHost, where can I have a sample or better directions how to use “File” in Node-Red on iHost and what is the path and directory where you should create a json file for logging purposes, how do you address a new volume you created and create a file and then write to the file.