"Implementation Steps"
1. Check the installation VSFTPD server
After entering the terminal as root (the other account enters the terminal can enter the root mode with the SU root password), enter the following command in the Terminal command window to verify: # Rpm–qa | grep vsftpd. If the results are displayed as "Vsftpd-1.1.3-8", the system already has the VSFTPD server installed. If there is no reply, the system is not installed.
2. If installed, you can use the command to delete:
Yum Remove vsftpd
Or
RPM-E--nodeps Installation Name
3. The VSFTPD server is not installed in the system and is installed with the Yum command.
#:yum Install VSFTPD
4. Create an FTP directory
#:mkdir/ftp
5. Create user home directory as/FTP, no login server permissions
5.1 Useradd ftpuser-d/ftp-s/sbin/nologin
5.2 Granting file permissions
Chown-r ftpuser.ftpuser/ftp
5.3 Access to the root directory to view the FTP directory permissions
5.4 Setting the user password
passwd Ftpuser
6. Start command
Service VSFTPD Start
Service VSFTPD Stop
Service VSFTPD Restart
7. Configure the VSFTPD configuration file.
# ls /etc/vsftpd/ftpusers user_list vsftpd.conf vsftpd_conf_migrate.shvim vsftpd.conf modify the corresponding values as follows:anonymous_enable=no #禁止匿名用户登录 local_enable=yes #允许本地实体用户登录 write_enable=yes #允许用户上传数据 & nbsp;local_umask=022 #建立新目录 (755) and file (644) Permissions dirmessage_ Enable=yes #若登录目录下有. Message displays the contents of the file can create the. message file yourself and write the information in the login directory xferlog_enable=yes #启动日志文件记录, recorded in/var/log/xferlog connect_from_port_20=yes #支持主动式连接功能 xferlog_std_ Format=yes #支持WuFTP的日志文件格式 local_root=/ftp #限制登录用户只能在/ftp directory Operation chroot_ Local_user=yes #限制登录用户在主目录内local_root定义目录 chroot_list listen=yes # Use stand alone to start vsftpd pam_service_name=vsftpd #支持PAM模块的Manage Userlist_enable=yes Account login control within the #支持/etc/vsftpd/user_list file tcp_wrappers=yes #支持TCP wrappers firewall mechanism ================== major modifications: #登录欢迎词
Ftpd_banner=welcome to my FTP service.
#匿名访问
Anonymous_enable=no
#增加本地目录
Local_root=/ftp
#打开以下两个配置
Chroot_list_enable=yes
# (default follows)
Chroot_list_file=/etc/vsftpd/chroot_list
#增加使用本地时间
Use_localtime=yes
Add users to the following files
FTP login test, if no ftp command, download: Yum install FTP
Attention:
Comment out the following items or Yes to No
Otherwise the user can switch to the root directory
#chroot_local_user =yes
Linux Configuration FTP Server