博客 / 詳情

返回

CentOS7快速搭建VSFTP

1. 安裝vsftp服務

yum install -y vsftpd

2. 添加ftp用户

useradd -d /home/ftpuser -g ftp -s /sbin/nologin ftpuser

3. 修改用户登錄密碼

passwd ftpuser

4. 編輯/etc/vsftpd/vsftpd.conf配置

刪除這兩行的註釋
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
增加內容
allow_writeable_chroot=YES

5. 編輯配置文件/etc/vsftpd/chroot_list

將用户名稱ftpuser寫入

6. 編輯/etc/pam.d/vsftpd配置

將這一行註釋
auth required pam_shells.so

7. 重啓vsftp服務

systemctl restart vsftpd

8. 關閉防火牆

關閉防火牆
systemctl stop firewalld
關閉開機自啓動
systemctl disable firewalld

9. 關閉selinux

關閉selinux
setenforce 0
關閉開機自啓動
編輯/etc/selinux/config
將SELINUX=enforcing改為SELINUX=disabled

user avatar
0 位用戶收藏了這個故事!

發佈 評論

Some HTML is okay.