2005年12月18日日曜日

ProFTPDの導入

ProFTPDもVineLinux3.1であればデフォルトで導入されている。
サーバーを起動させるために /etc/proftpd.conf を編集

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
○ServerName は任意でOK。接続した時に表示される>
ServerName   *****
○standalone でシステムに常駐
ServerType standalone
○デフォルトサーバを有効にする
DefaultServer   on
○FFFTPで.htaccess等 ./等で始まるファイルを表示、削除できるようにする場合に追記
ListOptions "-a"
○接続された時に表示されるバナーメッセージを記述
この項目が無いと ProFTPD を使っている事と、バージョンが相手に知られてしまう
ServerIdent on "FTP OK"
○この二つの項目を off にする事で高速に接続可能
UseReverseDNS   off
IdentLookups   off
○ ProFTPD が動作するポート番号を指定(21番を指定しておけば良いようだ)
# Port 21 is the standard FTP port.
Port   21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask   022
# Use localtime
TimesGMT   FALSE
○子プロセスの最大値を設定
# 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. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances   30
○ パスワードの入力ミスは3回まで
MaxLoginAttempts 3
○ ユーザが認証されるまでの間、ProFTPD はこのユーザ権限で動作している
# Set the user and group under which the server will run.
User   nobody
Group   nobody
○ 上書きを許可
# Normally, we want files to be overwriteable.
<Directory />
AllowOverwrite on
</Directory>
○ 詳細なログのフォーマットと取得
LogFormat allinfo "%t : %u (%a [%h]) : [%s], %T, %m (%f)"
LogFormat write "%t : %u : %F (%a)"
LogFormat read "%t : %u : %F (%a)"
LogFormat auth "%t : %u (%a [%h])"
ExtendedLog /var/log/proftpd/all.log ALL allinfo
ExtendedLog /var/log/proftpd/write.log WRITE write
ExtendedLog /var/log/proftpd/read.log READ read
ExtendedLog /var/log/proftpd/auth.log AUTH auth
○この下に「Anonymous」の記述があるが全て「#」でコメントアウトする事によって、
 Anonymous としては動作しなくなる
 Anonymousはメルアドさえ登録すればアクセスできるようにするものらしいので、なんか危険を感じてコメントアウトした
# A basic anonymous configuration, no upload directories.
#<Anonymous ~ftp>
#User ftp
#Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
#UserAlias anonymous ftp
# Limit the maximum number of anonymous logins
#MaxClients 10
# do not require shells listed in /etc/shells (user ftp do not have
# shell...)
#RequireValidShell no
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
#DisplayLogin welcome.msg
#DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot
#<Limit WRITE>
#DenyAll
#</Limit>
#</Anonymous>
○ログの保存場所を作成
# mkdir /var/log/proftpd
以上で Proftpd.cof の設定は終了
WebminでFTPサーバーを起動させる

0 件のコメント:

コメントを投稿