zoukankan      html  css  js  c++  java
  • nginx和php-fpm的用户权限

    1. 启动php-fpm
      sudo php-fpm -c /etc/php.ini
      [17-Sep-2018 00:36:59] ERROR: [pool www] please specify user and group other than root
      [17-Sep-2018 00:36:59] ERROR: FPM initialization failed

    开始的时候,使用本机wyc用户名及group名staff,发现session写到了/var/tmp/下面,wyc账户没有权限写,切换到root账户,

    切换到root账户,及wheel组

    php-fpm启动项里有-c可以允许用root启动
    -R, --allow-to-run-as-root
    Allow pool to run as root (disabled by default)

    2.切换Nginx的账户,默认nobody,切换成root账户,user root 会报错
    ➜ conf sudo /usr/local/openresty/nginx/sbin/nginx -s reload
    nginx: [emerg] getgrnam("root") failed in /usr/local/openresty/nginx/conf/nginx.conf:3

    必须加上wheel组名就好了

  • 相关阅读:
    撕衣服
    寒假作业1编程总结。
    C Traps and Pitfallss
    《彻底搞定C指针》文档整理
    C语言中内存分配 (转)
    ASCII
    ipad
    tour
    Diet
    第7章 输入与输出
  • 原文地址:https://www.cnblogs.com/mentalidade/p/9658605.html
Copyright © 2011-2022 走看看