戻る

vsftpd.confファイルの編集例

○ ファイルの場所
  /etc/vsftpd.conf

○ ファイル内編集箇所

匿名でのFTP操作を許可するか。
# The default compiled in settings are very paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
#
# Allow anonymous FTP?
anonymous_enable=NO

※Noにする事でブラウザからのFTP操作は出来なくなります。

ローカル内でのFTP操作を許可するか。
# Uncomment this to allow local users to log in.
local_enable=YES

※Yesにする事でローカル内のPC全てFTP操作が可能になります。

asciiコードで転送するか
# 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 turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
ascii_upload_enable=YES
ascii_download_enable=YES

vsftpd.user_listのファイルを利用するか。
# 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_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list

vsftpd.ftpusersファイルの編集例

○ ファイルの場所
  /etc/vsftpd.ftpusers

○ ファイル内修正箇所

FTP拒否設定ユーザ
# Users that are not allowed to login via ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
china9988

vsftpd.user_listファイルの編集例

○ ファイルの場所
  /etc/vsftpd.user_list

○ ファイル内修正箇所

FTP使用許可ユーザ
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd.ftpusers
# for users that are denied.
# root
# bin
# daemon
# adm
# lp
# sync
# shutdown
# halt
# mail
# news
# uucp
# operator
# games
# nobody

user

拒否ユーザは全てコメントアウトします。


修正後は必ず再起動を行う。
# service ftpd restart