Ubuntuに vsftped を install
パッケージの確認
sudo apt-cache showpkg vsftpd
パッケージのインストール
sudo apt-get install vsftpd
起動
sudo /etc/init.d/vsftpd start
停止
sudo /etc/init.d/vsftpd stop
確認
sudo /etc/init.d/vsftpd status
/etc/ftpusers | ftpサーバーへのログインが禁止されているユーザの一覧が設定されているファイル |
/etc/vsftpd.conf | ftpサーバーの設定ファイル |
以下、/etc/vsftpd.conf|ftp に対して、種々設定を行う
Anonymous(匿名)ユーザを禁止する
# Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=NO
FTP接続するサーバーに登録されているユーザでログインできるようにする
# Uncomment this to allow local users to log in. local_enable=YES
ファイルのアップロード/削除などの更新ができるようにする
# Uncomment this to enable any form of FTP write command. write_enable=YES
ディレクトリごと一括での転送を有効とする
# 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
設定をしたら、再起動をすること
sudo /etc/init.d/vsftpd restart
参考
UbuntuへのFTPサーバ(vsftpd)のインストール|仮想専用サーバー ServersMan@VPS を使ってみる
・つながらないときは、サービスが上がっているか、確認しろ
・ポートがlistenされてるか確認しろ
・vsftpd.conf は YES や NO の後ろに 余分な空白がついているだけでもエラーになるようなので、注意せよ