title: GCP Compute Engine - cannot listen on port 80?
body: <p>I created a compute engine which has these network tags and firewall rules:
  <a href="https://i.stack.imgur.com/h2ERz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h2ERz.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/uQWEd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uQWEd.png" alt="enter image description here"></a>
  So if I understand this correctly, <strong>the machine is allowed to listen on port 80</strong>.
  I installed node and created a really simple http server just to see if I can reach the box via http. Logged in via ssh on cloud console. When I try to start it (e.g. <code>npm start</code> to run the server), it says: </p>
  
  <p><code>Error: listen EACCES: permission denied 0.0.0.0:80</code></p>
  
  <p>Why? How to resolve?</p>
  
  <p>I read somewhere that low port #s are usually restricted to root user, so I tried <code>sudo</code> it says <code>sudo: npm: command</code> not found and similar for sudo node.</p>
  
  <p>Also why is that when you create a server <a href="https://medium.com/google-cloud/manage-google-compute-engine-with-node-js-eef8e7a111b4" rel="nofollow noreferrer">using scripts like these</a>, the article says they are executed as root? How does that happen and why am I not executing as root when I'm the one who booted up the machine and logged in as myself? Yes, my understanding of linux perms is very newbie.</p>
  
  <p>Thanks...</p>