nginx two ways to enable users with permission
- 2020-05-13 04:32:36
- OfStack
nginx gives users permission to launch both methods
Normal users will report an error when restart and reload nginx:
the "user" directive makes sense only if the master process runs with super-user privileges,
ignored in /opt/nginx/conf/nginx.conf:1
I couldn't give developers root access, so I had to.
The reason: by default, Linux's ports below 1024 are reserved for root users
Method 1:
All users can run it (because of 755 permissions, file owner: root, group owner: root)
chown root:root nginx
chmod 755 nginx
chmod u+s nginx
Method 2:
Only root users and reistlin users can run (because of 750 permissions, file owner: root, group owner: www)
chown root:www nginx
chmod 750 nginx
chmod u+s nginx
Thank you for reading, I hope to help you, thank you for your support of this site!