I am creating a .txt file within node red that is running in a Docker Container. (Default settings apart from having a external folder linked to the container. )
The file is created with a simple inject and all of that is working well but the created file's Owner is root and that creates problems if I would like external access to the file.
Is there a way to set Node Red as a local user instead of root within Docker?
You could possibly change the file ownership from within the container. Running something chown uid:gid filename (using an exec node) and using the UID and GID numbers of your normal user account on the system. This is if the NR user within Docker is a root account.
Otherwise you could try changing the permission to be readable/writable by all users: chmod a+rwx file (also using an exec node).
If you just need to read the files then I think if you change the access mode of the directories /var/lib/docker and /var/lib/docker/volumes to 755 then you should be able to read files in the docker volumes, if that is what you are trying to do.