The system comes with the FTP service software. Vsftpd
Installing VSFTPD
Yum Install-y vsftpd
Start VSFTPD
/ETC/INIT.D/VSFTPD start
If the boot fails, it may be that the port is occupied and all FTP services have 21 ports
Netstat-lnp
Killall PURE-FTPD
The default FTP service allows users of the system to log on
Change user's password is passwd plus username
passwd Wangshaojun
Log on to the remote machine
lftp [email protected]192.168. 1.117
Shared directory in the user's home directory, the command to view home directories is that the local machine
grep wangshaojun/etc/passwd
WANGSHAOJUN:X:500:500::/home/wangshaojun:/bin/bash
Create files and directories in your home directory
Mkdir/home/wangshaojun/aabb
touch/home/wangshaojun/1122. txt
On the remote machine LS. You can view the two files that you just created. or PWD to see where you are.
Because there are no restrictions on home directories, you can switch to any directory. This is a very dangerous behavior.
Restricting user access
Open the VSFTPD configuration file and remove the Chroot_local_user=yes comment
Vim/etc/vsftpd/vsftpd.conf
Chroot_local_user=yes
Restart VSFTPD
/ETC/INIT.D/VSFTPD restart
The remote machine then switches the directory display to fail, only in the current directory.
Deploy and tune 1.5 VSFTP deployment and optimization-1