2

I've downloaded the Moovweb SDK and installed it on my computer.

I ran moov login and entered in my credentials.

I generated a project using moov generate example example.com

Why do I need to type sudo moov server --auto-hosts ?

What is it doing that it needs super user access?

gregorygtseng
  • 851
  • 4
  • 12

2 Answers2

3

You need that root access to run service that uses port 80, or any port below 1024.

This is linux kernel security feature.

More detailed information:

"Why can only root listen to ports below 1024?" at Mikael Ståldal’s blog


Solution 1:

If you don't want to enter root password everytime or automate that kind of task by script - learn to use sudoers.

HowTO: Sudoers Configuration at ubuntuforums.org


Solution 2:

Port limit is defined in kernel source, in include/net/sock.h file.

/* Sockets 0-1023 can't be bound to unless you are superuser */
#define PROT_SOCK       1024

To change this on your desktop (not recommended on servers) - you may compile new kernel, with PORT_SOCK set to 79 to unlock 80 port for non-root users, or set it to 0 to unlock all ports.

Kamil
  • 13,363
  • 24
  • 88
  • 183
1

It launches the server in the ports 80 or 443 which requires root privileges to do so.

ssedano
  • 8,322
  • 9
  • 60
  • 98