When using VPS to set up a website environment, most users either use a WEB panel or use a one-click package. If they pursue technology or reflect their own capabilities, they will install their own assembled environments. In many one-click package environments, the LNMP environment of June is still widely used. Version 1.2 was released in July. Although many problems were reported when the new version was released, after a few months, it should be relatively stable.
The old left found that this one-click package had too strict permission settings during the application of WordPress. For example, when we started a topic online in the background, we could not see other topic packages in our topic directory.
1. Problem presentation
In our WordPress background appearance-after clicking the theme, we will see this interface.
We can only see the current topic, but cannot see other topics in the topic directory, let alone start another topic. In addition, the current topic does not have the permission to edit. This is due to the restriction of permissions on a component.
2. Solution
To solve this problem, we have shared the limitations on the scandir function before. We can just remove this restriction.
1. vi/usr/local/php/etc/php. ini
2. Find the disable_functions line.
3. Delete the scandir function location, as shown in the figure above. Because LNMP is directly restricted during the installation of the default package, it should be considered as a security issue. If we need or do not fully understand the purpose, after we start the current topic, add this function, except that FTP is required to be locally used to edit the topic later.
4. Restart PHP to take effect.
The code is as follows: |
Copy code |
/Etc/init. d/php-fpm restart
|
Finally, let's check the effect and return to the topic menu.
So far, we have solved this problem.