15
17

More than 5 years have passed since last update.

vsftpdを設定した

Last updated at Posted at 2014-08-25

要件

  • /srv/htdocs/ をデザイナがFTPで読み書きしたい。
  • 念のため /srv/htdocs/ より上には移動できないようにしておく。

インストール

pacman -Sy vsftpd
adduser designer
passwd designer

ファイルリスト

  • /etc/vsftpd.conf
  • /etc/vsftpd/vsftpd_user_conf/designer
  • /etc/vsftpd/vsftpd.user_list
  • /etc/vsftpd/vsftpd.chroot_list

設定

/etc/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/vsftpd.chroot_list
listen=YES

userlist_deny=NO
userlist_enable=YES
userlist_file=/etc/vsftpd/vsftpd.user_list
user_config_dir=/etc/vsftpd/vsftpd_user_conf
seccomp_sandbox=NO
allow_writeable_chroot=YES

seccomp_sandbox=NO
allow_writeable_chroot=YES

これがないと接続できなかった。

参考:

/etc/vsftpd/vsftpd_user_conf/designer
local_root=/srv/htdocs/
  • FTP接続時、/srv/htdocs/ に移動
/etc/vsftpd/vsftpd.user_list
designer
  • FTP接続できるユーザを限定する
/etc/vsftpd/vsftpd.chroot_list
local_root=/srv/htdocs
  • FTP接続とともに /srv/htdocs にchroot。 /srv/htdocs を / とみなす。

vsftpdサービス開始

systemctl start vsftpd
15
17
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
15
17