Product SiteDocumentation Site

11.3. FTP文件服务器

FTP (File Transfer Protocol——文件传输协议)是因特网的第一批协议之一。(RFC 959 在 1985 年发行!)甚至在 Web 诞生之前就用于分发文件(HTTP 协议创建于 1990年,并由 RFC 1945 正式在其 1.0 版本中定义,在 1996 年发行)。
This protocol allows both file uploads and file downloads; for this reason, it is still widely used to deploy updates to a website hosted by one's Internet service provider (or any other entity hosting websites). In these cases, access is enforced with a user identifier and password; on successful authentication, the FTP server grants read-write access to that user's home directory.
其它 FTP 服务器主要用于发布文件供公众下载;Debian 软件包就是个好的示例。这些服务器的内容取自其它地理上的远程服务器;然后供不那么远的用户来获取。这意味着不需要客户端认证;结果,这个操作模式被称为“匿名 FTP”。非常正确的是,客户端以 用户名 anonymous来认证;密码为了方便起见通常是用户的电子邮件地址,但服务器会忽略掉。
Many FTP servers are available in Debian (ftpd(-ssl), proftpd-basic, pure-ftpd and so on), which all provide the virtual ftp-server package. Please note that the pyftpd package, however, has been removed from the Debian project due to not being actively maintained anymore and being incompatible with Python 3. The Falcot Corp administrators picked vsftpd because they only use the FTP server to distribute a few files (including a Debian package repository); since they don't need advanced features, they chose to focus on the security aspects.
安装软件包会创建 ftp 系统用户。这个账户总是用于匿名 FTP 连接,并且其家目录(/srv/ftp/)就是连接到这个服务上的用户可使用的树的根。默认配置(在 /etc/vsftpd.conf 中)需要一些更改,以迎合使大文件可供公众下载的简单需要:匿名王文需要启用(anonymous_enable=YES)并且对本地用户的只读访问需要被禁止(local_enable=NO)。后者非常重要,因为 FTP 协议不使用任何形式的加密,并且用户密码能够通过网络来翻译。
FTP and FTPS resources can be accessed with a variety of clients, with and without a graphical user interface, and they can also be mounted locally using the curlftpfs command from the similarly named package.