[gvp@alt-cti03 (TEST1) /var/gvp/Nginx/nginx-1.8.0/sbin] ./nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
You edited the sudoers file to allow gvp to run programs as root.
In order to do so, you have to put “sudo” in front of the command, which
stands for “do as super user”.
As a side-note, allowing every single program to be run as superuser
without the necessity of a password can pose a big security threat if
your account is ever compromised.
In Linux (and most other Unix based systems) ports below 1024 need to be
opened using the root user. So you need to start NGINX as root which
will open the port and then drop down to an unprivileged user for the
port.
@Daniel,
You were true on the side-note, sudo prefixed command for NGinx actions
will
cause an serious threat. I missed the note…
@Andrew
also stated “In Linux (and most other Unix based systems) ports below
1024
need to be opened using the root user. So you need to start NGINX as
root
which will open the port and then drop down to an unprivileged user for
the
port.”
also stated “In Linux (and most other Unix based systems) ports below 1024
need to be opened using the root user. So you need to start NGINX as root
which will open the port and then drop down to an unprivileged user for the
port.”
As you’re using a ‘privileged’ port ( ie one with a value lower than
approx 1000 ), the process needs to be run by a superuser. You can set
it up through sudo to reduce the risk for an ordinary user.
On 02/13/2016 07:22 AM, smsmaddy1981 wrote:
Any other feasibility to achieve restart of Nginx from user other than root?