# Allow anonymous FTP? (Beware - allowed by default if you comment this out).anonymous_enable=NO # <= 変更(匿名ユーザログイン禁止)# Activate logging of uploads/downloads.xferlog_enable=YES # <= 変更(ログファイル書き込み有効化)# You may override where the log file goes if you like. The default is shown# below.xferlog_file=/var/log/vsftpd.log # <= コメント解除&変更(ログファイル名)# If you want, you can have your log file in standard ftpd xferlog formatxferlog_std_format=NO # <= 変更(wu-ftpd スタイルでログを記録)# By default the server will pretend to allow ASCII mode but in fact ignore# the request. Turn on the below options to have the server actually do ASCII# mangling on files when in ASCII mode.# Beware that on some FTP servers, ASCII support allows a denial of service# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd# predicted this attack and has always been safe, reporting the size of the# raw file.# ASCII mangling is a horrible feature of the protocol.ascii_upload_enable=YES # コメント解除(アスキーモードでのアップロードを許可)ascii_download_enable=YES # コメント解除(アスキーモードでのダウンロードを許可)# You may fully customise the login banner string:ftpd_banner=Welcome to mk-mode FTP service. # <= コメント解除&変更(ログイン時にソフト名とバージョンを非表示(設定のメッセージを表示))# You may specify an explicit list of local users to chroot() to their home# directory. If chroot_local_user is YES, then this list becomes a list of# users to NOT chroot().chroot_local_user=YES # <= コメント解除(デフォルトでホームディレクトリより上層へのアクセスを禁止)chroot_list_enable=YES # <= コメント解除(ホームディレクトリより上層へのアクセスを許可するユーザのリストの有効化)# (default follows)chroot_list_file=/etc/vsftpd/chroot_list # <= コメント解除(ホームディレクトリより上層へのアクセスを許可するユーザのリスト名)# You may activate the "-R" option to the builtin ls. This is disabled by# default to avoid remote users being able to cause excessive I/O on large# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume# the presence of the "-R" option, so there is a strong case for enabling it.ls_recurse_enable=YES # <= コメント解除(ディレクトリごと削除可能)# When "listen" directive is enabled, vsftpd runs in standalone mode and# listens on IPv4 sockets. This directive cannot be used in conjunction# with the listen_ipv6 directive.listen=YES # <= IPv4 をリッスンする# This directive enables listening on IPv6 sockets. By default, listening# on the IPv6 "any" address (::) will accept connections from both IPv6# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6# sockets. If you want that (perhaps because you want to listen on specific# addresses) then you must run two copies of vsftpd with two configuration# files.# Make sure, that one of the listen options is commented !!listen_ipv6=NO # <= IPv6 をリッスンしない# 以下を最下行へ追加use_localtime=YES # <= タイムスタンプを日本時間pasv_addr_resolve=YES # <= PASVモード接続先IPアドレスをホスト名から取得pasv_address=ftp.mk-mode.com # <= PASVモード接続先IPアドレスが牽けるホスト名pasv_min_port=4000# <= PASVモード接続時の最小ポート番号pasv_max_port=4005# <= PASVモード接続時の最大ポート番号ssl_enable=YES # <= SSLの有効化rsa_cert_file=/etc/pki/tls/certs/vsftpd.pem # <= サーバー証明書を指定force_local_logins_ssl=NO # <= ログイン時にSSL接続を強制しない※暗号化しない接続もできるようにする場合のみforce_local_data_ssl=NO # <= データ転送時にSSL接続を強制しない※暗号化しない接続もできるようにする場合のみ
# cd /etc/pki/tls/certs/
# make vsftpd.pem
umask 77 ; \
PEM1=`/bin/mktemp /tmp/openssl.XXXXXX` ; \
PEM2=`/bin/mktemp /tmp/openssl.XXXXXX` ; \
/usr/bin/openssl req -utf8 -newkey rsa:2048 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 -set_serial 0 ; \
cat $PEM1 > vsftpd.pem ; \
echo "" >> vsftpd.pem ; \
cat $PEM2 >> vsftpd.pem ; \
rm -f $PEM1 $PEM2
Generating a 2048 bit RSA private key
....................................................................+++
.....+++
writing new private key to '/tmp/openssl.a7lbqG'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:JP # <= 国名
State or Province Name (full name) []:Shimane # <= 都道府県名
Locality Name (eg, city) [Default City]:Matsue # <= 市区町村名
Organization Name (eg, company) [Default Company Ltd]:mk-mode.com # <= 会社名・サイト名
Organizational Unit Name (eg, section) []: # <= 部署名
Common Name (eg, your name or your server's hostname) []:ftp.mk-mode.com # <= ホスト名・管理者名
Email Address []:root@mk-mode.com # <= 管理者メールアドレス
# cd