Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional AddOn Node-Red installs and runs with root #337

Closed
freaky-m0 opened this issue Feb 12, 2018 · 7 comments
Closed

Optional AddOn Node-Red installs and runs with root #337

freaky-m0 opened this issue Feb 12, 2018 · 7 comments

Comments

@freaky-m0
Copy link

I installed the nodered option with openhabian-config. This script needs to run with root (sudo).

In the installation process following question comes along:

$ bash /tmp/update-nodejs-and-nodered.sh 

Root user detected. Typically install as a normal user. No need for sudo.

Are you really sure you want to install as root ? (y/N) ? n

If you say "n" nodered isn't installed after it. If you say "y" nodered processes are running as "root"

I don't think that is right? It should run with a separate user or with openhabian at least or?

@skatehouse
Copy link

skatehouse commented Feb 17, 2018

Same issue here. Wanted to install via sudo openhabian-config.
After choosing the install script for nodered the same as mentioned above.

$ bash /tmp/update-nodejs-and-nodered.sh 

Root user detected. Typically install as a normal user. No need for sudo.

Are you really sure you want to install as root ? (y/N) ? n

$ npm install -g node-red-contrib-bigtimer 
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/node-red-contrib-bigtimer
npm ERR! path /usr/lib/node_modules/node-red-contrib-bigtimer
npm ERR! code ELOOP
npm ERR! errno -40
npm ERR! syscall access
npm ERR! ELOOP: too many symbolic links encountered, access '/usr/lib/node_modules/node-red-contrib-bigtimer'

I can see that some directories and files have been created in /usr/lib/node_modules
Owner is nobody / Group is root
Is it possible to delete the whole directory?
is it possible to install node red manually?!

@freaky-m0
Copy link
Author

Installing manually shouldn't be a problem. But the method from the openhabian-config wizard is not correct.

@ThomDietrich
Copy link
Member

Hey you two!
That sounds like a valid argument to me 👌 I did not implement this routine, it was provided by another developer who is not around any longer. Would you guys like to provide a Pull Request? From what I read it would be a good idea to create a separate user for nodered or to use the openhabian, possibly he openhab user. For some other services like frontail we are using openhab, this might be the easiest and best choice.

@OTrumpf
Copy link

OTrumpf commented Mar 6, 2018

Now I understand the reason for this issue: #213

Perhaps, someone can explain, how to deinstall node-red (installed via openhabian-config under /root/.node-red) and how to perform a regular install with openHab while preserving all flows...

@ThomDietrich
Copy link
Member

@OTrumpf just uninstall and install following the normal instructions.

But seriously, it would be easier if someone provided a fix for the openHABian routine.

@freaky-m0
Copy link
Author

Sorry but I'm not skilled enough to do that :(

@EliasGabrielsson
Copy link
Contributor

I closing this issue now. In my understanding this is fixed with: #420 If someone thinks different please make me aware so this issue can be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants