2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS6.9 vsftpdの設定ではまったのでメモ

Last updated at Posted at 2018-02-15

※SELinuxの無効化を前提

以下のURLを参考にvsftpdをインストール
https://www.server-world.info/query?os=CentOS_6&p=ftp

yum -y install vsftpd
vi /etc/vsftpd/vsftpd.conf
================================================
/etc/vsftpd/vsftpd.conf
# 12行目:匿名ログイン禁止
anonymous_enable=NO
# 81,82行目:コメント解除 ( アスキーモードでの転送を許可 )
ascii_upload_enable=YES
ascii_download_enable=YES
# 96,97行目:コメント解除 ( chroot有効 )
chroot_local_user=YES
chroot_list_enable=YES
# 99行目:コメント解除 ( chroot リストファイル指定 )
chroot_list_file=/etc/vsftpd/chroot_list
# 105行目:コメント解除 ( ディレクトリごと一括での転送有効 )
ls_recurse_enable=YES
# 最終行へ追記
# ルートディレクトリ指定 (指定しない場合はホームディレクトリがルートディレクトリとなる)
local_root=public_html
# ローカルタイムを使う
use_localtime=YES
================================================
# /etc/rc.d/init.d/vsftpd start
Starting vsftpd for vsftpd: [ OK ]
# chkconfig vsftpd on

vi /etc/vsftpd/vsftpd.conf
# 最終行に追記:PASVポートを固定
pasv_enable=YES
pasv_min_port=21000
pasv_max_port=21010
# /etc/init.d/vsftpd restart
# iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
# iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 21000:21010 -j ACCEPT

#ftpusersからrootを除外
vi /etc/vsftpd/ftpusers
================================================
# root
================================================

#vsftpdを再起動
# /etc/init.d/vsftpd restart

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?