linux - What user is generally used to run php-fpm and nginx?
伊谢尔伦
伊谢尔伦 2017-05-16 13:12:30
0
5
554
  1. What user is generally used to run php-fpm and nginx in a formal environment?

  2. How to set the directory rights of the website to be safer?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(5)
左手右手慢动作
  1. Usually the www user is used to run the lnmp architecture

  2. In order to prevent hackers from modifying the system program when a vulnerability occurs in the system, so:

    网站上的 php 文件属主要是非 www 用户,给予644权限。
    网站上的所有目录是755权限,属主也是非 www 用户。
    网站如果有应用需要写文件的目录,比如上传目录,那么此目录和目录下的所有文件属主是 www 用户。
阿神

1.www user
2.644, upload directory and runtime directory 744

阿神

nobody

迷茫

I just checked and found that php-fpm is run by the http user like nginx...and the master process is all root, which is so unsafe...but it seems very troublesome to repair. I still have a bunch of nobody that I haven’t fixed yet...

phpcn_u1582

Ubuntu is under www-data,lnmp装的是www
In short, you cannot use root to run. If you use root to run, php can operate the operating system-related files.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template