proftpd の設定

net-ftp/proftpd-1.3.3c を新規インストールして、

# cd /etc/proftpd
# cp proftpd.conf.sample proftpd.conf

として、proftpd.conf を編集するわけだが・・

# This is a sample ProFTPD configuration file for Gentoo Linux (rename
# it to 'proftpd.conf' for actual use). It establishes a single server
# and a single anonymous login.

ServerName "ProFTPD Default Server"
ServerType standalone
DefaultServer on
RequireValidShell off
AuthPAM off
AuthPAMConfig ftp

# Listen on the standard FTP port 21.
Port 21

# New directories and files should not be group or world writable.
Umask 022

# To prevent DoS attacks set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once simply increase this value.
MaxInstances 30

# The server will run under ftp/ftp.
User ftp
Group ftp
(後略)

たしか以前は、

# The server will run under ftp/ftp.
User proftpd
Group proftpd

となっていて、USER=GROUP=proftpd はインストール時に作成されるので、パスワードだけ設定すればよかったはず。

チェックしてみると USER=GROUP=ftp も既に作られているので同様にパスワードを設定しただけで、クライアントからユーザー名:ftp で接続を試みたところ、

Response:	530-Unable to set anonymous privileges.
Response:	530 Login incorrect.

というメッセージが出て拒否される。

いろいろ設定を変えてみたが効果なし。

そこで、/etc/proftpd/proftpd.conf に、

# The server will run under ftp/ftp.
User proftpd
Group proftpd

と設定後、新たに proftpd グループと proftpd ユーザーを作り、このアカウントで接続したらOKだった。

しかし、もうちょっとスマートな解決法があるんだろうと思う。