Debian(etch)にProFTPdをインストールします。
# aptitude update # aptitude install proftpd
インストール中にProFTPdの動作方法を聞かれますので、ここではinetdを選択します。
以上でインストールが終了します。
インストール後ローカルでProFTPdに接続できるか確認します。
# ftp localhost Connected to localhost. 220 ProFTPD 1.3.0 Server (Debian) [127.0.0.1] Name・・・・ ・・・・ ftp>
ProFTPdの設定ファイルであるproftpd.confをバックアップし、ProFTPdの設定を行います。
# cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.org
proftpd.confを修正します。
まず、ユーザがログインしたときのデフォルトルートディレクトリを設定します。
DefaultRoot ~
DNSの逆引きを行わないように設定します。
UseReverseDNS off
ProFTPdは、初期設定でidentプロトコル(Identification Protocol)を使うように設定されているため FTPで接続する時に、待たされる場合があります。
このidentプロトコルによる確認処理を行わないように設定します。
IdentLookups off
[参考:identプロトコル(RFC1413)]
proftpdはデフォルトでResumeを禁止しているので許可するよう設定します。
AllowStoreRestart on
AllowRetrieveRestart on
アクセス元を制限するためhosts.allowへ追加します。
# vi /etc/hosts.allow proftpd:192.168.1. proftpd:127.0.0.1
「421 Service not available,remote server has closed connection」と出て接続できない場合、proftpd.confの 記述が間違っている可能性があります。
そんな場合、proftpd.confのServerTypeをstandaloneに変更し、次のコマンドを実行します。
# /usr/sbin/in.proftpd - Fatal : unknown configuration 'TimeGMT' on line 39・・・
こんな感じで記述ミスを教えてくれます。
Copyright 1997-2008 BBB All rights reserved.