text WordPress文件权限命令(终端)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text WordPress文件权限命令(终端)相关的知识,希望对你有一定的参考价值。

Change folder permissions to 755 by running the below command.

find /path/to/your/wordpress/install/ -type d -exec chmod 755 {} \;

To change file permissions to 644, our command is as follows.

find /path/to/your/wordpress/install/ -type f -exec chmod 644 {} \;

In my case, /path/to/your/wordpress/install/ will be replaced by /var/www/html/ so my command would be as below.

find /var/www/html/ -type d -exec chmod 755 {} \;
find /var/www/html/ -type f -exec chmod 644 {} \;

In the above commands, -type d for directories and -type f for files.

Note: Never give 777 permission to any file or directory, even upload directories. If any file has 777 permission that means we are making this file World-Writable. This should not be acceptable.

以上是关于text WordPress文件权限命令(终端)的主要内容,如果未能解决你的问题,请参考以下文章

在终端中安装 Sublime Text 的命令行工具“subl”,权限被拒绝?

在终端中安装 Sublime Text 的命令行工具“subl”,权限被拒绝?

text 使用终端历史文件保存终端命令

求mac终端给某个用户管理员权限的命令,

使用终端shell命令批量改动一个文件下的全部文件的读写权限

用户权限相关命令