Modify webserver site default user group permissions

Source: Internet
Author: User
For example, when the webserver site directory is used to build the nginxwebserver for webtest, the default user and user group permissions are nginx: nginx, that is, nginx. the default user in conf and php-frm.conf is webtest: nginx: nginxnginx. conf: usernginxnginx; ph... for example, the webserver site directory is webtest.
 
When setting up the nginxwebserver server, the default user and user group permissions are nginx: nginx,
 
That is, the default user in nginx. conf and php-frm.conf is
 
Webtest: nginx
 
Nginx. conf:
 
User nginx;
 
 
Php-frm.conf:
 
 
Unix user of processes
  Nginx
 
Unix group of processes
  Nginx
 
To modify the default user group permission of webtest to www, you need to modify the following files:
 
1. change nginx. conf to user www;
 
2, php-frm.conf, modify
 
Unix user of processes
  Www
 
Unix group of processes
  Www
 
3. you also need to modify the nginx file in the/var/lib directory
 
Chown-R www: www nginx
 
The third reason for modification is as follows:
 
If you modify only the preceding two points, the following error is reported:
 
14:09:03 [crit] 2970 #0: * 1623918 open () "/var/lib/nginx/tmp/fastcgi/0/56/0000002560" failed (13: Permission denied) while reading upstream, client: 221.221.14
4.156,
 
 
Because:
 
Nginx uses the buffer size specified by fastcgi_buffer_size to cache the content of the fastcgi stream. When the size exceeds this size, the request buffer will be applied with the quantity and size specified by fastcgi_buffers. If the size is still exceeded, the excess content will be written to the temporary file. In the preceding log, nginx does not have the permission to write temporary files.
 
 
 
 
 
In this way, the site is changed to www: www user and user group permissions.
 
That's All!
Author attachment
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.