Hello,
I want to build a web interface over a NodeJS server. One of the purpose of the interface is to be able to control the Linux PC where the server is running. For example : update (via apt-get for example), reboot, install packages, etc.
I think about 2 ways to do that :
- Running the server as root
- Executing commands via a shell executed with the uid/gid of root
To be honest both sounds for me as unsecured but i don't see how to go over that.
Users of the web interface will have to log in (i use PassportJS with a SQLite database) before getting the access to the part of the site where you can execute commands that require root privilege.
I also work to add a SSL support on the server.
Any advices to implement this function without opening all doors ?
Thanks !
Chris