nginx: [warn] the "user" directive makes sense only if the maste


nginx: [warn] the "user" directive makes sense only if the master process runs with super-user
原創薛思遠的csdn 最后發布於2019-04-29 20:18:00 閱讀數 5136 收藏
展開
普通用戶在restart和reload nginx時,會報錯:

nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /usr/local/nginx/conf/nginx.conf:2

我又不能給開發人員root權限,沒辦法,只好這么做。

原因是:默認情況下Linux的1024以下端口是只有root用戶才有權限占用

方法一:

所有用戶都可以運行(因為是755權限,文件所有者:root,組所有者:root)

chown root.root nginx
chmod 755 nginx
chmod u+s nginx

方法二:

僅 root 用戶和 wyq 用戶可以運行(因為是750權限,文件所有者:root,組所有者:www)

chown root.www nginx
chmod 750 nginx
chmod u+s nginx

方法三:還有就是在sbin目錄下使用管理員權限啟動 sudo ./nginx

點贊
————————————————
版權聲明:本文為CSDN博主「薛思遠的csdn」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/weixin_40797576/article/details/89682172


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM