Home > Backend Development > PHP Tutorial > File permissions - How to configure reasonable file directory permissions in nginx and phpweb environments?

File permissions - How to configure reasonable file directory permissions in nginx and phpweb environments?

WBOY
Release: 2016-09-01 00:20:14
Original
1299 people have browsed it

The question is as mentioned.

Path requirements: Upload files, front-end code cache, logs, website scheduled task scripts, and permissions required for website operation itself.
Details: Uploading files requires a disk cache path, and the front-end code requires a slightly longer cache path. Scripts can also be executed by scheduled tasks (sh /www/pro1/script/a.sh)

What are the general control standards for website directory permissions?

Reply content:

The question is as mentioned.

Path requirements: Upload files, front-end code cache, logs, website scheduled task scripts, and permissions required for website operation itself.
Details: Uploading files requires a disk cache path, and the front-end code requires a slightly longer cache path. Scripts can also be executed by scheduled tasks (sh /www/pro1/script/a.sh)

What are the general control standards for website directory permissions?

Upload file directories for reading and writing, front-end code caching for reading and writing, log reading and writing, scheduled script execution, and website program directory execution. . . That's probably it. In fact, directory permissions do not affect security issues very much. . . If the program or server has vulnerabilities, security cannot be guaranteed by permissions alone. . .

This involves knowledge of Linux directory permission management. There are concepts of users and user groups under Linux. For files/directories, there are three permissions: read, write, and execute, corresponding to r=4, w=2, and x=1 respectively.
You can search on Baidu or Google for knowledge about Linux directory permission management. Set permissions according to your own needs.
You can also refer to the following information:

  • https://www.centos.bz/2011/09...

  • http://platinhom.github.io/20...

  • http://blog.csdn.net/boybruce...

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template