[root@linux ~]# yum -y install vsftpd ← 安装vsftpd Loading "installonlyn" plugin Setting up Install Process Setting up repositories core [1/4] core 100% |=========================| 1.1 kB 00:00 crash-hat [2/4] crash-hat 100% |=========================| 951 B 00:00 extras [3/4] extras 100% |=========================| 1.1 kB 00:00 updates [4/4] updates 100% |=========================| 951 B 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 12 kB 00:00 crash-hat : ################################################## 44/44 Added 6 new packages, deleted 6 old in 0.78 seconds primary.xml.gz 100% |=========================| 879 kB 00:00 extras : ################################################## 2470/2470 Added 19 new packages, deleted 3 old in 27.37 seconds primary.xml.gz 100% |=========================| 94 kB 00:00 updates : ################################################## 314/314 Added 78 new packages, deleted 0 old in 6.94 seconds Excluding Packages in global exclude list Finished Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for vsftpd to pack into transaction set. vsftpd-2.0.4-1.2.i386.rpm 100% |=========================| 17 kB 00:00 ---> Package vsftpd.i386 0:2.0.4-1.2 set to be updated --> Running transaction check
Dependencies Resolved
============================================================================= Package Arch Version Repository Size ============================================================================= Installing: vsftpd i386 2.0.4-1.2 core 135 k
Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 135 k Downloading Packages: (1/1): vsftpd-2.0.4-1.2.i 100% |=========================| 135 kB 00:00 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: vsftpd ######################### [1/1]
Installed: vsftpd.i386 0:2.0.4-1.2 Complete!
vsftpd的简单设定
[root@linux ~]# vi /etc/vsftpd/vsftpd.conf ← 编辑vsftpd的设定文件 # Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=NO ← 禁止anonymous登陆(匿名)
# Activate logging of uploads/downloads. xferlog_enable=YES ← /var/log/vsftpd.log记录(1/3)
# You may override where the log file goes if you like. The default is shown # below. xferlog_file=/var/log/vsftpd.log ← /var/log/vsftpd.log记录(2/3)
# If you want, you can have your log file in standard ftpd xferlog format xferlog_std_format=NO ← /var/log/vsftpd.log记录(3/3)
# By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that on some FTP servers, ASCII support allows a denial of service # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd # predicted this attack and has always been safe, reporting the size of the # raw file. # ASCII mangling is a horrible feature of the protocol. ascii_upload_enable=YES ← 允许ascii模式上传 ascii_download_enable=YES ← 允许ascii模式下载
# You may fully customise the login banner string: ftpd_banner=Welcome to blah FTP service. ← 登陆FTP后不表示FTP的版本
# You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). chroot_local_user=YES ← 禁止访问上一层目录 chroot_list_enable=YES ← 启动允许访问上一层目录的用户列表 # (default follows) chroot_list_file=/etc/vsftpd/chroot_list ← 指定用户列表文件
# You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. ls_recurse_enable=YES ← 允许带目录删除