Home  >  Q&A  >  body text

Problems with nginx installation and compilation.

Background description:
When installing nginx with root, why do you need to create a www user? At first, I thought that only the www folder can be accessed after nginx is installed, but I found that the root folder can also be accessed (even if the top configuration If the root in the file is / and there is an html file), then what is the use of creating a www user? I have this question and I want to ask everyone.

漂亮男人漂亮男人2713 days ago406

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-16 17:21:09

    Establishing a running user of www 用户的目的是为了访问控制,特别是写入权限的控制。默认情况下用户自己的目录对其他用户只开放读取权限,如果使用 www 来作为 nginx can well protect other programs in the system from being destroyed due to negligence or loopholes in the writing of the server program.

    reply
    0
  • Cancelreply