Creating files on ihost with Node red

Added Node red using the Add-on Guide Node red seems to work - I am new to it, but it works for me!

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).

Has anyone run into this already? and fixed?


not clear about your description, the path should be complete.
in your case for example

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 :blush:. 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?