The method of deleting or modifying the. user.ini file in the root directory of wordpress in the lnmp environment

WordPress Tutorial one thousand nine hundred and ninety-nine

After building the wordpress website in the lnmp server environment, use the chown When the command modifies the user group to which the directory belongs, the prompt ". user.ini Operation not permitted" appears, which means that the. user.ini file cannot be modified or deleted, and not only chown Command, rm Or other commands.

PS: In fact,. user.ini is not a wordpress file, but an lnmp file. The. user.ini file records the path address of the website folder, which is used to prevent cross directory access or cross directory reading of files.

If you want to delete the file or make it not affect chown Command, you can use the chattr The command reduces the security of the. user.ini file before you operate.

The method is as follows

1. Enter the directory where the. user.ini file is located (if you do not enter the directory, enter the complete path in the following command)

2. Execute the following command statements in the remote login tool (such as putty, SecureCRT or other tools):

 one
 chattr -i .user.ini

After execution, use chown The command will no longer be affected by the. user.ini file, and you can delete or modify the file.

4. It is recommended to execute the following command again to restore the security of the. user.ini file after the modification is completed

 one
 chattr +i .user.ini

The difference from the previous sentence is that the minus sign - Change to a plus sign +

Highlight: