Product SiteDocumentation Site

11.3. FTP ファイルサーバ

FTP (File Transfer Protocol) はインターネットにおける最初のプロトコルの 1 つです (RFC 959 は 1985 年に発行されました!)。FTP はウェブが生まれる前にファイルを配布するために使われました (HTTP プロトコルは 1990 年に作られ、1996 年の RFC 1945 でバージョン 1.0 が正式に定義されました)。
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.
vsftpd パッケージをインストールすると、ftp システムユーザが作成されます。ftp ユーザは匿名 FTP 接続の際に常に使われるものです。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.