Files being written as 'root' instead of 'user'

Hi

Ubuntu 18.04

Brand new to node-js. I have hooked into an S7 (Siemens PLC system) device and I am writing to a file.
If I have node-red set up as a service via systemd the files are written with root ownership. To get around this I am starting node-red locally - after which the files are written to the 'user'.

Is there any way to change the systemd setup to write the files as 'user'?

Thanks
Dave

Did you install via the official installer script? If not, you might want to reinstall.

and if you did use the script then do it again, but this time not logged in as root and not using sudo. Login as the user you want to run node-red.

OK, so if you created the startup file yourself, you are lacking the config that sets the appropriate user.

This may give you some inspiration:

And as Colin says, make sure you didn't install Node-RED as root.

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