dusk-network / node-installer

Easy to use tool to install a Dusk node with extra utilities
Mozilla Public License 2.0
21 stars 17 forks source link

Ensure that nodes installed using the installer work with superusers other than 'root' #89

Open fe71ks opened 1 month ago

fe71ks commented 1 month ago

Summary

During ITN, a node would only work correctly when the setup with ITN-installer was done as user "root". Using any other superuser would result in the node not connecting ("'service rusk status' returning (code=exited, status=101)"). Security best practice is not to use root for a VPS (Digital Ocean and most other how-to's provide specific instructions) and it would be great if this is taken into account.

Detailed Description (optional)

Not sure if this is a bug or expected behavior but many node runners will prefer not to use the root user but a newly created user.

Steps to reproduce

  1. Set up VPS
  2. Create a new user and grant rights (usermod -aG sudo )
  3. Install node using ITN-installer and start node
  4. Check Rusk status: node is not connecting and returns "'service rusk status' returning (code=exited, status=101)"

Relevant context

Happened on the following setups:

Possible Solution (optional)

Ensure any future installer works with any (super)user or that the documentation makes clear how to ensure the user is set up correctly.

HDauven commented 1 month ago

The answer is "it depends", but ideally the installer would be more dynamic in that regard. As such, I see it more as a "feature request" or "enhancement", rather than an actual bug, since the script was initially tailor-made for following our ITN guide.

It's still possible to do fully custom setups. I've done so myself, but it's definitely not for everyone. So if the script is able to handle different users and rely on groups as well that would be a lot nicer.