*FTP サーバー [#gee72527]
 FTP サーバーのメモです。
**vsftpd [#icdbc000]
 vsftpd は RedHat9 に標準で入っている FTP サーバーです。
 /etc/vsftpd/vsftpd.conf を書き換えることによって
 設定を変更できます。
 /etc/vsftpd/vsftpd.conf を書き換えることによって設定を変更できる。

**vsftpd 設定 [#a1cc41b5]
-anonymous がログインできないようにする。
 anonymous_enable=NO

-チェンジルートリストで指定した人以外はルートに行けなくする。
 anonymous_enable=YES
 local_enable=YES
 write_enable=YES
 local_umask=022
 dirmessage_enable=YES
 xferlog_enable=YES
 connect_from_port_20=YES
 xferlog_std_format=YES
 ascii_upload_enable=YES
 ascii_download_enable=YES
 chroot_local_user=YES

-チェンジルートリストを有効
 chroot_list_enable=YES

-チェンジルートユーザーリストファイル指定
 chroot_list_file=/etc/vsftpd.chroot_list
 chroot_local_user=YES ならチェンジルートしない人のリスト。
 NO ならチェンジルートする人のリスト。

-単独で起動、または xinetd 経由で起動
 pam_service_name=vsftpd
 userlist_enable=YES
 userlist_deny=NO
 listen=NO
 YES --- 単独で起動します。
 NO --- xinetd経由で起動します。

-/etc/hosts.allow /etc/hosts.denyリスト有効
 tcp_wrappers=YES
 グローバルアドレスを与えるなら有効にする。

-ローカルタイム(日本時間)を使うか、グリニッジ標準時を使うか
 use_localtime=YES
 yes=日本時間
 #force_dot_files=YES ←なぜかエラーになる

-/etc/vsftpd.user_list の使用
 userlist_enable=YES
 userlist_deny=NO
 /etc/vsftpd.user_list に書いてある人のみログイン可能。
**チェンジルートユーザーリストファイル [#e4be7497]
 /etc/vsftpd.chroot_list
 に root のみ記述。

-
**ユーザーリストファイル [#s1bdfdef]
 /etc/vsftpd.user_list
 に root と各ユーザー記述。

**禁止ユーザーリストファイル [#z1b968a1]
 /etc/vsftpd.ftpusers
 に禁止ユーザー記述。

**xinetd の設定 [#pcb93433]
 /etc/xinetd.d/ftpd ファイル
 /etc/xinetd.d/ftpd に以下を記述。
 service ftp
 {
 	flags           = REUSE
 	socket_type     = stream        
 	wait            = no
 	user            = root
 	server          = /usr/sbin/vsftpd
 	server_args     = /etc/vsftpd/vsftpd.conf
 	log_on_failure  += USERID
 	disable         = no
 }

**vsftpd の起動 [#o64d0e2b]
**vsftpd の再起動 [#o64d0e2b]
 /etc/rc.d/init.d/xinetd restart
 を実行する。

----
[[前に戻る>Linux]]



トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS