20201202在Fedora32安裝vsftpd

出自金門農工維基III
跳至導覽 跳至搜尋
(1)# dnf install vsftpd
:
Installed:
  vsftpd-3.0.3-36.fc32.x86_64
Complete!

(2)# vi /etc/vsftpd/vsftpd.conf
:
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
:

(3)# systemctl start vsftpd
(4)# ps ax|grep vsftpd
2942191 ?        Ss     0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
2942611 pts/0    S+     0:00 grep --color=auto vsftpd


(5)# systemctl enable vsftpd
Created symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /usr/lib/systemd/system/vsftpd.service.


(6)# useradd tree

(7)# passwd tree
Changing password for user tree.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

(8)# cat /etc/passwd
:
tree:x:1002:1002::/home/tree:/bin/bash
[root@lfwiki ~]#

(9)C:\> ftp 163.25.20.15
已連線到 163.25.20.15。
220 (vsFTPd 3.0.3)
200 Always in UTF8 mode.
使用者 (163.25.20.15:(none)): tree
331 Please specify the password.
密碼:
500 OOPS: could not read chroot() list file:/etc/vsftpd/chroot_list
500 OOPS: priv_sock_get_result
遠端主機已關閉連線。

(10)# vi /etc/vsftpd/chroot_list
tree

(11)F:\>ftp 163.25.20.15
已連線到 163.25.20.15。
220 (vsFTPd 3.0.3)
200 Always in UTF8 mode.
使用者 (163.25.20.15:(none)): tree
331 Please specify the password.
密碼:
230 Login successful.
ftp> put a.txt
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp: 8 位元組已傳送,時間: 0.00秒數 2.67KB/sec。
ftp> quit
221 Goodbye.