# yum -y install vsftpd
# rpm -qa | grep vsftpd
vsftpd-3.0.2-25.el7.x86_64
# vi /etc/vsftpd/vsftpd.conf
...
anonymous_enable=NO
...
# systemctl start vsftpd
# systemctl enable vsftpd
# systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
Active: active (running) since 一 2019-05-20 11:27:19 EDT; 26s ago
Main PID: 7386 (vsftpd)
CGroup: /system.slice/vsftpd.service
└─7386 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
5月 20 11:27:19 centos.kk systemd[1]: Starting Vsftpd ftp daemon...
5月 20 11:27:19 centos.kk systemd[1]: Started Vsftpd ftp daemon.
# firewall-cmd --permanent --zone=public --add-service=ftp
success
# chattr +a -R /home/vsftp //+a只能以附加方式寫入
# ls /home/vsftp/*/1.docx //列出班級每人的作業
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
Active: active (running) since 一 2019-05-20 11:27:19 EDT; 26s ago
Main PID: 7386 (vsftpd)
CGroup: /system.slice/vsftpd.service
└─7386 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
5月 20 11:27:19 centos.kk systemd[1]: Starting Vsftpd ftp daemon...
5月 20 11:27:19 centos.kk systemd[1]: Started Vsftpd ftp daemon.
# firewall-cmd --permanent --zone=public --add-service=ftp
success
# firewall-cmd --reload
success
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: ssh dhcpv6-client ftp
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
# useradd vsftp
# passwd vsftp //123456
# su -l vsftp
$ mkdir {01..50}
$ ls
01 04 07 10 13 16 19 22 25 28 31 34 37 40 43 46 49
02 05 08 11 14 17 20 23 26 29 32 35 38 41 44 47 50
03 06 09 12 15 18 21 24 27 30 33 36 39 42 45 48
$ su
密碼:
[root@centos vsftp]# cd
[root@centos ~]#
# ls /home/vsftp/*/1.docx //列出班級每人的作業
沒有留言:
張貼留言