Question

Is runing node with root safe?

  • Posted March 14, 2014

I installed node as described in this tutorial.

https://www.digitalocean.com/community/articles/how-to-configure-the-nginx-web-server-on-a-virtual-private-server

I’m going to let users upload and download. That makes me thing " is it safe to run node as root?"

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi, <br> <br> <br>Short answer No… <br> <br>Long answer <br>Running anything that uploads or downloads files as root is never a good idea as with root you can do all sorts of nasty things if the js scripts your are running via node are ever exploited. Just a side not when allowing a user to upload files always make sure the files are uploaded into an non-webfacing dictionary as otherwise an exploit could be uploaded and executed very easily. <br> <br>Hope this helps