WordPress:UNIX Shell Skills

来自站长百科
Fludlen讨论 | 贡献2008年6月24日 (二) 17:26的版本
跳转至: 导航、​ 搜索
Note: This article covers an advanced topic.
注意: 这篇文章包含一个高级主题。


If you have recently moved to WordPress:WordPress from a hosted blogging solution like Blogger or TypePad, you may be unfamiliar with the tasks of managing a webspace as well as a blog. WordPress is based on PHP; many hosting services use servers running Linux and Apache; many web hosts offer not only web-based control interfaces to their customers but also shell access or command-line interfaces. Many WordPress users may not be familiar with using the shell to manage their file systems. This article explains the more commonly-used UNIX commands and demonstrates how a routine administrative task, namely a minor WordPress upgrade, is carried out in the shell.

如果你最近从一个托管的写博客的solution,如Blogger或者TypePad中进入了WordPress,你可能对于管理网络空间和博客的任务不太熟悉。WordPress是以PHP为基础的; 许多托管服务使用服务器运行Linux 和Apache; 许多网络服务器不仅向它们的顾客提供以网络为基础的 控制界面 还提供 shell权限 或者命令行界面。许多WordPress用户对于使用shell 来管理文件系统,可能不熟悉。这篇文章介绍了更加常用的UNIX命令并且示范了一个常规的管理任务是如何运行的,如一个小型的WordPress升级,就是在shell上执行的。

The bash shell

The bash shell

The shell offered by your web host is likely to be bash, which stands for "Bourne Again Shell" after Stephen Bourne who wrote the original modern Unix shell. bash is distributed by the Free Software Foundation. There are a number of different Unix shells. The commands briefly described below apply to almost all of them.

你的网络主机提供的shell很可能是bash,bash指的是"Bourne Again Shell",是以编写了original 现代 Unix shellStephen Bourne 命名的。bash是由免费软件基金会来命名的。有许多不同的Unix shells。下面简单描述的命令行几乎对于所有的Unix shells都是适用的。

ssh, the secure shell

ssh, 安全 shell

The Secure Shell (ssh) is a complete set of tools for remote administration of your website. It includes SFTP (Secure File Transfer Protocol) for the uploading of files to your host. The main benefit of using ssh to interface with a remote server is increased security. With other server access tools, your login password may be transferred over the Internet in plain text, which may be intercepted.

安全 Shell (ssh)是用于远程管理你的站点的一套完整的工具。包含有SFTP (安全文件传输协议)用来向你的主机上传文件。使用ssh的主要好处是,通过与一个远程的服务器接触来增加安全性。与其它的服务器访问工具一起,你的登录密码可能通过一个纯文本在因特网上传输,可能会被截取。

To use ssh under Windows, use PuTTY or Cygwin, a UNIX-like environment for Windows. The FileZilla ftp client also supports sftp via ssh-2.

在Windows下,使用 ssh , 使用 PuTTY 或者Cygwin, 为Widows使用一个类似UNIX的环境。The FileZilla ftp client 通过ssh-2也支持sftp 。


To use ssh on a Mac running OS X, use the Terminal-based SSH program supplied with Mac OS X or download Fugu.

要在一个运行OS X的Mac上使用ssh , 使用Mac OS X 支持的,以终端为基础的SSH程序或者下载Fugu


On Linux or UNIX-based operating systems, you can use the text-based SSH and SFTP clients from terminals such as Konsole, Gnome Terminal or xterm. Graphical FTP clients such as KBear and gFTP also support sftp.

在 Linux 或者以 UNIX为基础的操作系统上, 你可以从终端上使用以文本为基础的SSH和SFTP clients,如Konsole, Gnome Terminal 或者xterm。 图画式的 FTP clients 如KBear and gFTP 也支持sftp

Your hosting company will provide the username and host details (the "shell account") necessary to use these. They may be different from the ones you use with your control panel. To use, at the Terminal prompt type

ssh username@host

or

sftp username@host

你的主机公司会提供用户名你和主机的详细信息,使用这些信息是必要的。这些信息可能与你在控制面板上使用的信息有所不同。要使用这新信息,在Terminal prompt 输入

ssh username@host

or

sftp username@host

Terminology

术语

Before we get started with some UNIX commands, let's review some terminology.

在开始处理一些UNIX commands之前,让我们来阅读一些术语。

Directories? Folders?
目录? 文件夹?


A Directory is the same thing as a folder. Directories can contain subdirectories.

;目录与文件夹指的是同一样的内容。目录可以包含有子目录。

  • A dot (period or full stop) refers to the current directory; two dots represent the directory above the current directory.
  • 点(句点或者句号)指的是当前的目录;两个点指的是当前目录的上级目录。
  • The tilde character (~) refers to your home directory.
  • 曲线字符(~)指的是你的主页目录。
  • The tilde followed by a user's name (as in ~username) refers to that user's home directory.
  • 用户名后面的曲线字符(如在~用户名)指的是用户的主页目录。
Both the dot symbols and the tilde can be treated as directory names. For example, ../config.php refers to the file config.php in the directory above the current one. The directory ./functions.php refers to functions.php in the current directory. And ~/public_html or ~/htdocs are (usually) the names of your main web directory, which is likely to be a subdirectory of your home directory. The domain URI shown in your web browser's address bar refers to the main web directory, not to the site owner's home directory.


句点标记和曲线符号都可以看作为目录名称。例如, ../config.php指的是当前目录的上一次目录上的文件 config.php。目录 ./functions.php 指的是当前目录中的 functions.php。而且 ~/public_html or ~/htdocs (通常)是你的主要网页目录的名称,这个名称很可能是你的主页目录的一个子目录的名称。显示在你的网络服务器的地址框中域 URI 指的是主要的网页目录,而不是站点所有者的主页目录。
前斜线(/)
The forward slash fulfils the same role it does in a website URI: it shows the item after to be in a subdirectory or the directory before it. A forward slash on its own refers to the root directory, which is at the top of the file system.

:前斜线的功能与前斜线在网站URI上的功能相同:it shows the item after to be in a subdirectory or the directory before it.斜线本身代表根目录,在文件系统的顶上方

Directory Name Character Rules and Spaces
目录名字符规则和空格
A file or directory name can contain any standard character except a forward slash — including white spaces. However, when entering shell commands, you separate commands, parameters, and files with spaces. If you have a space in a file or directory name, you need to use a backslash in front of it or put quotation marks round the name. A directory called My Pictures would be entered as
"My Pictures"
or as
My\ Pictures

:文件或者目录名称可以包含任何标准的字符,但是一个前斜线&mdash除外;空格也除外。然而,当输入shell 命令行的时候,你用空格将命令行,参数,和文件分开。如果你的文件或者目录名中有一个空格,你需要在空格的前面使用一个前斜线。或者在文件或目录名称的周围加上一个引号。一个称为我的图片的目录,会以

"我的图片"

或者

我的\ 图片

输入。

The * and ? Symbols: The * and ? symbols are called wildcards and can be used in any command which deals with files. The * represents any number of characters. The ? represents just one. Note that Linux filenames are case-sensitive — the norm is lowercase. All commands are lowercase.

*和? 符号: *? 符号称为通配符 可以用在任何处理文件的命令行中。* 指的是许多字符。?指的是一个字符。注意Linux 文件名是区分大小写的— 规范的形式是小写形式。所有的命令行都是小写的。


Command Options: Commands usually accept options or parameters, which are given in a sequence beginning with a hyphen (-). If you would want to set options b, r and f for a command, type

command -brf

Other specifications, like file names, go after the options. 命令选项:命令通常接受选项或者参数, 这些选项和字符以一个连字号开始,挨次给出。如果你想为一个命令设置选项b, r and f,输入

command -brf

,其它的详细信息,例如文件名,在选项的后面。

Shell Commands

Shell 命令

Here's a brief introduction to some useful UNIX shell commands.

下面简要介绍一些有用的UNIX shell命令。

ls

ls

This command displays a listing of a directory's contents. Unmodified, the command displays the contents of the current directory; you can also specify another directory's content to list. Some useful options are:

这个命令显示了一个目录的内容的列表。为更改前,命令显示了当前目录的内容;你可以特别规定列出另一个目录的内容。一些有用的选项是:

  • ls -l
  • ls -l
If the list is long, you can display the list in pages. To do this, type
ls -l |less

:如果列表很长,你可以在网页上显示列表。输入

ls -l |less

,执行这一步

(Note: The vertical bar | is also known as a UNIX pipe). The pipe bar means that the output from ls -l is submitted to the program less, which displays pages of whatever input it receives. You can press space to view the next page, or the arrow keys to go up and down.
(注意: 竖线 |也成为一个 UNIX pipe). pipe bar 指的是来自ls -l的产出,提交到了一个程序 less, 这个程序显示了任何收到的输入内容。你可以点击空白处,来访问下一个网页,或者点击箭头,向上后者向下翻看。
  • ls -la
Includes hidden files (i.e. files that begin with a dot, like .htaccess)in the directory listing.
  • ls -la
包含隐藏文件 (例如,以一个圆点开始的文件,像目录列表中的 .htaccess)。
  • ls -l g*
  • ls -l g*
Specifies any other directory or file group to list after the options, and in this example would list all the files beginning with g, while ls public_html would list the contents of public_html.

:指定任何其它的目录或者文件组列在选项的后面,在一个例子中,会列出所有以g开始的文件,然而ls public_html会列出public_html的内容。

cd

cd

The cd command changes the current directory. To switch from the current directory into a sub-directory, put the sub-directory's name after the command. To change into a sub-directory wp-content, you'd type

cd wp-content

cd命令更改了当前的目录。要从当前的目录切换到一个子目录中,将子目录的名称放到命令行的后面。要变成一个子目录wp-content,你需要输入

cd wp-内容


To move up into the directory above the current directory, type

要进入当前目录的上级目录,请输入:

cd ..


cd ..

To change from the current directory to your home directory, type

要从当前目录切换到你的主目录中,输入

cd


cd


mkdir

mkdir

The mkdir command creates a new directory inside the current one. To create a directory named audio inside the current directory, type

mkdir audio

mkdir命令创建了一个在当前目录内部创建了一个新的目录。要在当前的目录中,创建一个名为音频的目录,请输入

mkdir audio

To remove an empty directory, type rmdir directoryname for example:

rmdir audio

要移除一个空目录,请输入rmdir directoryname例如;

rmdir audio

rm

rm

The rm command deletes ('removes') a file. To remove an entire directory and its contents in one go, type rm -rf directoryname. To delete the entire content of the current directory, use

rm -rf *

Beware — once something is removed in this way, it is gone forever.

rm命令删除('移除')一个文件。要一次地删除整个目录以及目录中所包含的内容,输入rm -rf directoryname。要删除当前目录中的所有内容,使用

rm -rf *

要谨慎—一旦某个内容以这样的方式删除掉了,这个内容就永远都不会返回了。

exit

离开当前命令行外壳

The exit command ends your shell session.

exit命令结束了你的shell部分。

mv

mv

The mv command moves files from one place to a another; it is also used to rename files. Type

mv file new-location

mv命令将文件从一个位置移到了另一个位置;同时还会重新命名文件。输入

mv 文件 移到新的位置

If the new-location parameter is a (valid) directory in the current filesystem, the file is moved into that directory; if it isn't (and if it doesn't clash with an existing filename), the file will be renamed as new-location. You can also move and rename a file with one command:

mv file ~/path/to/new-file-name

如果 new-location 参数是当前文件系统中的一个 (有效的) 目录,文件就会一旦这个目录;如果目录不是有效地目录 (而且目录名不与当前的文件名相冲突的话), 文件 就会被重新命名为 new-location。你也可以使用一个命令,移动和重新命名一个文件:

mv file ~/path/to/new-file-name


cp

cp

The cp command copies files or directories. To copy a directory and its entire contents, use

cp命令复制文件或者目录。要目录一个目录和目录的全部内容,请使用

cp -rf source-file destination


cp -rf source-file destination


ln

ln

The ln command creates links. The links relevant to our purposes are "symbolic links" or symlinks — files which "point" to other files or directories in the filesystem. When you access a symlink, you are actually accessing the original file. If you want to change the location of your WordPress directory from, say, /wordpress/ to /blog/, you could create a symlink as follows:

ln -s wordpress blog

ln命令创建链接。与我们的目标相关的链接是"符号链接" 或者 symlinks —文件系统中 "指向" 其它文件或者目录的文件。当你访问一个 symlink的时候,你真正是在使用原始文件。如果你想要将你的WordPress目录的位置,如从/wordpress/ 改到/博客/中,你可以创建一个如下的symlinks:

ln -s wordpress blog


Access will then be through either the file or directory's actual name — wordpress — or through the link name — blog. In the Options panel in the Wordpress WordPress:Administration Panels, set the "Blog address (URI)" field to show the symlink rather than the name of the directory.

然后通过文件或者目录真正的名称来访问— wordpress —或者通过链接名— blog。在WordPress管理面板选项面板中,设置"博客地址(URI)"区,来显示symlink取代目录名。

tar and unzip

tar 和解压

The tar and unzip commands are used to compress and decompress "archive" files. Archives are files or folders that have been "compressed" — i.e. reduced in file-size — and are commonly used for distribution and backup purposes. The unzip command is used for files ending with .zip; the tar command is used for files ending with .tgz or .tar.gz.

tar解压 命令是用来压缩和解压"归档"文件的。存档指的是已经被"压缩的"文件或者文件加 — 例如,文件按大小得到了压缩— 通常是用来发行或者作为备份用的。解压 命令是用来将文件以.zip结束; the tar 命令是用来将文件以.tgz or .tar.gz结束.


Unzipping files: If the file is a .tar.gz archive, type

tar -zxvf file.tar.gz

解压文件:如果文件是一个.tar.gz归档,请输入

tar -zxvf file.tar.gz

If it's a zip archive, you may need to create a temporary directory into which you'd unzip its contents (its files might be unzipped into the current directory otherwise).

如果文件是压缩归档,你可能要创建一个临时的目录,你将文件的内容解压到这个目录中(否则,文件就会解压到当前的目录中)。

chmod and file permissions

chmod和文件权限

The chmod command changes the permissions on a given file. UNIX file permissions specify who can do what with a given file. The ls -l command will tell you what permissions a file or directory has:

chmod更改了一个特定的文件的权限。UNIX 文件权限规定了谁可以对文件进行什么样的处理。ls -l 命令告诉了你一个文件或者目录拥有什么权限:

 -rw-r--r--      1 domain60 vweb     840   Feb 21 06:38 wp-config-sample.php
 -rw-r--r--      1 domain60 vweb     826   Jun 29 20:31 wp-config.php
 drwxr-xr-x      4 domain60 vweb     4096  Jun 29 20:30 wp-content
 -rw-r--r--      1 domain60 vweb     762   Mar 29 16:05 wp-feed.php
 drwxr-xr-x      3 domain60 vweb     4096  Jun 29 18:46 wp-images
 drwxr-xr-x      2 domain60 vweb     4096  Jun 29 18:46 wp-includes
 -rw-r--r--      1 domain60 vweb     840   二月 21 06:38 wp-config-sample.php
 -rw-r--r--      1 domain60 vweb     826   六月 29 20:31 wp-config.php
 drwxr-xr-x      4 domain60 vweb     4096  六月 29 20:30 wp-content
 -rw-r--r--      1 domain60 vweb     762   三月 29 16:05 wp-feed.php
 drwxr-xr-x      3 domain60 vweb     4096  六月 29 18:46 wp-images
 drwxr-xr-x      2 domain60 vweb     4096  六月 29 18:46 wp-includes


The permissions are displayed in the string of letters in the first column. The very first letter of that column indicates whether it is a file, a link, or a directory. A d denotes a directory, a l denotes a link, a hyphen denotes a file.

权限显示在第一个栏中的字母串中。那个栏中的第一个字母暗示了字母串是文件,链接还是目录。d表示目录,l表示链接,一个破折号表示一个文件。

The permissions are declared with the following nine letters, which are shown in groups of three. The first group of three concerns the owner, the second the group he belongs to (this is unlikely to concern you as a web host user), and the third concerns everyone else. Note that people with root access (administrators) have access to all files on the system.

权限是用下面九个字母公告的,这九个字母作为三组显示。第一组的三个字母,涉及所有者,第二组他所属于的那个组(不可能设计到你,一个网络主机用户),第三组涉及到其他所有的人。注意拥有根权限(管理员)的人能够访问系统上的所有文件。

The letters r, w and x stand for read, write and execute; if the file is a directory, executable means traversible, that is, that you can move into that directory with the cd command. Where a hyphen is shown in the permissions list, the permission is absent.

字母r, wx代表着阅读,写和执行;如果文件是一个目录,可执行的指的是可移动的,意思是你可以用cd命令,移动到那个目录上。当权限列表上出现一个破折号的时候,这个权限不存在。

You change permissions with the chmod command. You may, in fact, not have to change the permissions at all; some hosts automatically set certain permissions on any file in the web directory. Your host may also tell you what permissions need to be set on your server.

你用chmod命令更改权限。事实上,你可能不需要更改权限;一些主机在网络目录上的任何文件上,自动地设置某个权限。你的主机可能会通知你,你的服务器上需要设置什么权限。

The chmod command can be used to set permissions in two ways: with letters or with numbers. If you use letters, you could type

chmod o+w filename

This grants write privileges to everyone with access to the system. The first letter can be u (user), g (group) or o (other), or a combination; the + (grant) can also be - (withhold), and the third can also be r or x (read or execute).

chmod命令可以用来以两种方式设置权限:用字母或者用数字来设置权限。如果你使用字母,你可以输入

chmod o+w 文件名

这赋予每个人使用系统的特权。第一个字母可以使u(用户),g(小组)或者o(其它的),或者一个组合;the + (grant) 也可以是 be - (withhold), 第三个字母也可以是 r 或者 x (阅读或者执行)。

If you use numbers, all permissions for a file are set in one go. An example:

chmod 755 wp-images

sets the permssions of the wp-images directory to 755, whereby the first number (the "hundreds") is for the user, the second (the "tens") is for the group and the third (the "units") is for everyone else.

如果你使用数字,文件的所有权限都可以一次设置好。如:

chmod 755 wp-images

设置了wp-images目录的权限为755,然后第一个数字("百位数")是为用户设置的,第二位数("十位数")是为小组设置的,第三位数("个位数")是为其他所有的人设置的。

More about numerical permissions settings: To add 4 in any of the fields grants read privileges; to add 2 grants write and to add 1 grants executability; each combination has a unique number. The directories in the example above have the permission set 755, which is common for web-available directories, in which the user has full privileges while others have read and execute only; the files in the example have the permission set 644, in which the user can read and write while others can only read.

更多关于数字权限设置的内容:在任何区域中添加4,赋予了阅读权限;添加2赋予了编写的权限,而添加1赋予了执行的权限;每个组合都有一个独特的数字。上述例子中的目录,将权限设置为755,对于网络上可以使用的目录,这个权限非常常见,用户拥有所有的特权,而其他人只有阅读和执行的权限;上述例子中的文件的权限设置为644,用户可以阅读和编写文件,而其他人只能够阅读文件。

   6  4  4
  420400400
 -rw-r--r--  1 domain60 vweb  840  Feb 21 06:38 wp-config-sample.php

   7  5  5
  421401401
 drwxr-xr-x  2 domain60 vweb  4096 Jun 29 18:46 wp-includes


   6  4  4
  420400400
 -rw-r--r--  1 domain60 vweb  840  Feb 21 06:38 wp-config-sample.php

   7  5  5
  421401401
 drwxr-xr-x  2 domain60 vweb  4096 Jun 29 18:46 wp-includes


wget

wget

The wget command downloads a file if you put a web location (URI) after it. To download the latest WordPress release type

wget http://wordpress.org/latest.tar.gz

如果你在wget命令后,加上一个网络地址(URI),这个命令就会下载一个文件。要下载最新发行的WordPress版本,请输入

wget http://wordpress.org/latest.tar.gz

Upgrading WordPress from the Shell

从Shell中升级WordPress

Let's use the example of upgrading WordPress using the command line. First, establish the location of your WordPress on your web server's filesystem. This example assumes it is located at ~/public_html/blog.

让我们来使用,用命令行升级WordPress的例子。首先,在你的网络服务器的文件系统上确立你的WordPress的位置。这个例子中假如WordPress位于~/public_html/blog

  1. Download the current version of WordPress to your shell account's home directory and unzip it:
    wget http://wordpress.org/latest.tar.gz
    tar -zxvf latest.tar.gz
    1. 为你的shell帐户的主页目录下载当前的WordPress版本并且将这个版本解压:
      wget http://wordpress.org/latest.tar.gz
      tar -zxvf latest.tar.gz
      The WordPress archive will be unpacked into a new directory named /wordpress.
    2. Enter the new directory with the following command:
      cd wordpress
    3. WordPress存档文件会被解压到一个新的目录,目录名为/wordpress.
    4. 用下面的命令输入新的目录:
      cd wordpress
    5. Remove wp-config-sample.php:
      rm wp-config-sample.php
      (We will use our current wp-config.php instead)

    6. 移除 wp-config-sample.php:
      rm wp-config-sample.php
      (取而代之,我们会看到当前的wp-config.php)

    7. Remove the entire /wp-content directory from the new directory (we will replace it with the one from our WordPress blog directory):
      rm -rf wp-content
    8. 将整个/wp-content 目录,从新的目录中移除 (我们会用WordPress博客中的目录来代替这个目录):
      rm -rf wp-content

    9. Copy the blog's wp-config.php and .htaccess file to the new directory:
      cp ~/public_html/blog/wp-config.php .
      
      <li>将博客的<tt style="font-weight:bold; color:#036">wp-config.php</tt> 和<tt style="font-weight:bold; color:#036">.htaccess</tt> 文件复制到新的目录中: <pre>cp ~/public_html/blog/wp-config.php .
      
      
      cp ~/public_html/blog/.htaccess .
      Note: Don't forget the dot at the end of both commands!
    10. cp ~/public_html/blog/.htaccess . 注意: 不要网络两个命令后面的点号!


    11. Copy the wp-content directory to the new directory (it contains all our themes and plugins):
      cp -rf ~/public_html/blog/wp-content/ .
      Again, note the dot at the end of the command.
    12. wp-content目录复制到新的目录(包含了我们所有的主题和插件):
      cp -rf ~/public_html/blog/wp-content/ .
      再一次地注意,命令结尾的点号。

    13. Remove the entire contents of your WordPress blog directory:
      rm -rf ~/public_html/blog/*
    14. 移除你的WordPress博客目录中的所有内容:
      rm -rf ~/public_html/blog/*
    15. Finally, copy the entire contents of the new directory to your main blog directory:
      cp -rf * ~/public_html/blog
  2. 最后,将新目录的所有内容复制到你的主要博客目录中:
    cp -rf * ~/public_html/blog

SFTP Shell Commands

SFTP Shell 命令

SFTP stands for Secure File Transfer Protocol. It is an encrypted replacement for FTP, and as with FTP, you may use a shell-based client or one of the graphical clients mentioned at the top of this article. If your host supports SSH, it also supports SFTP.

SFTP代表安全文件传输协议,是加密的FTP形式,如FTP,你可以使用在这篇文章的顶端所提到的一个shell为基础的client或者一个图形client。如果你的主机支持SSH,主机就同样支持SFTP。

Shell-identical commands

与Shell一样的命令

Shell-type SFTP clients support commands similar to those used in bash. These include cd, ls, mkdir, rm and rmdir. It also supports ln, with the difference that you do not need to use the -s option to create symlinks; in sftp, the ln command makes symlinks by default. All of these work on files on your host's system.


Shell类型支持的命令,类似于用在bash中的命令。这些包括 cd, ls, mkdir, rmrmdir。也支持 ln, 不同的是,你不需要使用-s 选项来创建symlinks; 在sftp中, ln 命令使得symlinks 是默认的。所欲这些命令对于你的主机系统上的文件都起作用。

put and mput

put and mput

These two commands transfer to your host (i.e. upload) a single file (put) or any files that match the pattern you supply (mput); the wildcards * and ? described above can be used here.

这两个命令转移到你的主机(例如上传)一个单独的文件(put)或者任何与你支持的模式相匹配的文件(mput);以上所描述的通配符*?可以用在这儿。

get and mget

get and mget

These two commands transfer from your host to your local computer (i.e. download) a single file (get) or any files that match the supplied pattern (mget). As with mput, * and ? can be used.

这两个命令从你的主机转移到你的本地电脑上(例如下载)一个单一的文件(get)或者任何匹配支持的模式的文件(mget)。与mput一样,可以使用*?

cd, mkdir, ls

cd, mkdir, ls

These commands are identical to their bash shell counterparts: change the current directory, make a new directory, and list the contents of the current directory. To do the same things within SFTP on your own machine, add an l to the front of the commands: lcd, lmkdir, lls.

这些命令与命令的bash shell命令是相同的:更改当前的目录,创建一个新的目录,列出当前目录的内容。在你自己的电脑的SFTP内部执行同样的操作,在命令的前面添加一个llcd, lmkdir, lls

Further Reading

深入阅读

chmod tutorial

chmod 指南

What chmod? online file permissions calculator 什么 chmod?在线文件权限计算器

See also

也看看

WordPress:Changing File Permissions

WordPress:htaccess for subdirectories

更改文件权限

子目录的htaccess