Nginx user permissions

Source: Internet
Author: User
Nginx user permissions sometimes receive a 403 error when Nginx reads the local directory. First, let's take a look at Nginx user management. when Nginx is started with a Linuxservice script, it starts through start-stop-domain and runs the daemon process with the root permission. Then, daemon enters the... Nginx user permission. sometimes, when Nginx reads the local directory, it will receive a 403 error. First, let's take a look at Nginx user management. when Nginx is started with a Linux service script, it is started through start-stop-domain and runs the daemon process with root permission. Then, the daemon process reads the user configuration option in the/etc/nginx. conf file. by default, user = nginx is used to start worker process. The error 403 is because the nginx user does not have the permission to access the user directory for my current development,/home/dean/work/resources. The solution is to replace user = nginx with root and restart nginx. You have also tried other methods, such as setting 777 permissions for the/home/dean/work/resources directory, or adding nginx users to the root group. So when developing, use user = root configuration. In the product environment, the resouces directory can be placed in the nginx user directory, so the problem is not serious.
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.