LoginSignup
0
0

More than 3 years have passed since last update.

AWSでwordpressを動かす3_FTP接続

Posted at

本記事のゴール

FTP経由でwordpressプロジェクトファイルの更新ができるようになる

ユーザー作成

ec2-userに対して色々な操作をするのはセキュリティ上よろしくないのでwordpressユーザーを作成

# useradd -m wordpress
# passwd wordpress
# chmod 775 /home/wordpress

パス調整

# mv /var/www/wordpress /home/wordpress/
# chown wordpress:wordpress -R /home/wordpress/wordpress
# ln -s /home/wordpress/wordpress /var/www/wordpress

vsftpインストール

# yum install -y vsftpd
# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.org
# vi /etc/vsftpd/vsftpd.conf
# touch /etc/vsftpd/chroot_list
# systemctl start vsftpd
# systemctl enable vsftpd

▼書き換え
anonymous_enable=NO
chroot_local_user=YES
chroot_list_enable=YES
listen=YES
listen_ipv6=NO
tcp_wrappers=NO

▼追記
pasv_enable=YES
pasv_addr_resolve=YES
pasv_min_port=60001
pasv_max_port=60010
use_localtime=YES
force_dot_files=YES
allow_writeable_chroot=YES

セキュリティグループで、60001-60010ポートを指定IPのみ解放する
ローカルPCからFTPクライアントソフトで接続を試して、繋がればOK

0
0
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
0
0