Many friends often encounter permission problems during PHP operations. Here, I will discuss the permission issues with you based on my previous operation experience. Permission errors usually occur when data is read and stored. First of all, let's talk about the most common system permission restriction for the most widely used PHP system LINUX/WIN32. Let's talk about common errors in LINUX. When a user opens a website and accesses his site http: // mysite/, the user finds that the website cannot be accessed, but the prompt is that the access is forbidden. Q: Why is my website inaccessible after it is configured? A: First, log on to your machine (or ask your administrator to log on to the machine) and check whether your WEB directory has read permission for group/other users. Again, check whether your WEB server's directory settings allow browsing. Most of the problems will be solved after the corresponding data is modified. If the above operation steps still cannot solve your problem, please continue to look down. If the HTML file on your website is accessible, and some PHP files have access permissions problems, first of all, we are glad to tell you that your WEB server is normal, his permissions are normal. However, you only encounter problems in your php file. For example, the following code is used in your php file: ..... Of course, you can easily see the above Code. In fact, the example I want to talk about is that you may have a file (the directory is a special file-the explanation of the directory in linux) some operations, such as creation, deletion, and modification, usually result in File Permission problems. Here we should take a look at another knowledge. What are system permissions and FTP permissions? What is FTP permission? Of course, here is just a description based on my personal understanding. It is not a text definition in books. You can find more definitions online, but you only need to understand their meaning. System permissions (Note: The system mentioned here is the operating system): It is a system that limits the permissions of system users. FTP county: it is a permission Control System for FTP users. OK. Here, I have mentioned the above nonsense. If your FTP user is a user in your system, you only need to assign permissions to these directories in the system to solve the problem. If your FTP system uses your own user system, continue to look down and we know that the system has allocated a region to the FTP service, the FTP service has certain permissions for operations in this region, and the FTP service has added its own user management. Therefore, the FTP service has a second permission assignment under the constraints of system permissions. The permission representation in LINUX is also used. Here you should have a question like this: Q: Why is my system permission normal, but I am still accused of permission issues? A: under the constraints of system permissions, your FTP may have its own user management system. Therefore, you should use the FTP client to log on to your FTP host and perform File Permission operations. The procedure is described on many ISP help pages. After reading the above content, you should be able to solve 90% of the file permission problems. If you belong to that 10%, you are welcome to discuss it with me ~ In addition, for users in WIN32 systems, if your partition is in the NTFS format, you can refer to the above, if you are not NTFS, you can refer to the storage of FTP permission data not only for file operations, but also for databases and data stream databases: here we will use PHP with the most popular MYSQL for example. MYSQL has its own permission system, so a good DBA will always assign reasonable permissions to database users, database permissions are mostly concentrated in the following aspects: 1. The connection host is rejected. 2. The connection account is incorrectly matched. 3. The connection account has insufficient permissions. 4. The connection account has failed to operate the database that does not have permissions. (This problem is the same as 3. The account is insufficient throughout the county) data Stream: Most PHP Data streams are network-operated functions. If these functions are incorrect, they are mostly caused by the failure to obtain data due to the settings of the other server. At this time, you should consider modifying the code from your program (unless you can operate your target host) Author: sports98 (Even if you encourage me to write these words, keep them.) If you haven't written anything for a long time, are you falling behind... alas, people who write PHP extension libraries always think they are falling behind and write something for future reference.