Install
1) パッケージにないのでミラーサイトからソースを取得する
今回はftp.riken.jpから取得.ftp.riken.jp/net/ProFTPD/ditrib/sourceにある.
$ftp ftp.reken.jp
Connected to riksun.riken.go.jp.
220 ::ffff:134.160.38.1 FTP server ready
Name (ftp.riken.jp:xxxxxxx): anonymous
331 Anonymous login ok, send your complete email address as your password
Password: (E-mailを入力)
230 Anonymous access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd net/ProFTPD/distrib/source
250 CWD command successful
ftp> ls
229 Entering Extended Passive Mode (|||11415|)
150 Opening ASCII mode data connection for file list
-rw-r--r-- 1 archive archive 2545499 Feb 24 2010 proftpd-1.3.2e.tar.bz2
(中略)
-rw-r--r-- 1 archive archive 7596083 Sep 26 2011 proftpd-1.3.4rc3.tar.gz
-rw-r--r-- 1 archive archive 197 Sep 26 2011 proftpd-1.3.4rc3.tar.gz.asc
-rw-r--r-- 1 archive archive 58 Sep 26 2011 proftpd-1.3.4rc3.tar.gz.md5
226 Transfer complete
ftp> get proftpd-1.3.4rc3.tar.gz
ftp> quit
2) tarballの展開
# cp proftpd-1.3.4rc3.tar.gz /usr/local/src: cd /usr/local/src
# tar zxcf proftpd-1.3.4rc3.tar.gz
# cd /usr/local/src/proftpd-1.3.4rc3
3) configure実行
# ./configure --prefix=/usr/local/proftpd
4) インストール
# make && make install
5) 起動
# /usr/local/proftpd/sbin/proftpd
# ps aux | grep proftpd
nobody 2743 0.0 0.1 11008 1084 ? Ss 14:21 0:00 proftpd: (accepting connections)
# netstat -atn | grep 21
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
6) 終了
# killalll proftpd
または
# kill -SIGTERM <proftpdのプロセス番号>
設定
次の2種類の書式があある
- 書式1 ディレクティブ名 値
例)User protfpd
- 書式2 <ディレクティブ名>~</ディレクティブ名>
例) <Limit WRITE> Deny from all </Limit>
特定ユーザーによるアクセスを制限
/etc/ftpusersファイルを使ってログインできるユーザーを制限できる.
1) proftpd.confに以下の1行を加える
# vi /etc/proftpd.conf
UseFtpUsers on
2) ftpusersファイルの編集
1行に1ユーザー
# vi /etc/ftpusers
root # rootでのログイン禁止
bin
...