Installation and configuration of Linux vsftpd

Source: Internet
Author: User

ready to work: operating System (CentOS 7) with vsftpd*.rpm package download

1 [[email protected] ~]# wget https://mirrors.aliyun.com/centos/7.5.1804/os/x86_64/packages/ vsftpd-3.0.2-22.el7.x86_64.rpm

First step: install and check if VSFTPD is installed

1[Email protected] ~]# RPM-IVH vsftpd-3.0.2- A. el7.x86_64.rpm2Preparing ... ################################# [ -%]3Updating/Installing ...4    1: vsftpd-3.0.2- A. EL7 ################################# [ -%]5[Email protected] ~]# Rpm-qa |grep vsftpd6vsftpd-3.0.2- A. el7.x86_647[Email protected] ~]#

Step Two: start and test

1 [[email protected] ~]# vim/etc/vsftpd/vsftpd.conf

Modify the Listen=no to save and exit for Listen=yes , and the missing to add

1 [[email protected] ~]#/USR/SBIN/VSFTPD &  #启动 2 [[email protected] ~]ftp localhost #测试 3 [[email protected] ~]# ftp localhost4 Trying::1... 5 Ftp:connect to Address:: 1Connection refused 6 127.0. 0.1 ... 7 Ftp:connect:Connection refused 8

Step Three: modify the configuration of the VSFTPD

1 [[email protected] ~]cp/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.backup.conf #备份 2 [[ Email protected] ~]vim/etc/vsftpd/vsftpd.conf
#设置为NO代表不允许匿名anonymous_enable=Yes #设定本地用户可以访问, mainly the virtual host user, if set to no then the desired virtual user will not be able to access. Local_enable=YES #可以进行写的操作write_enable=YES #设定上传文件的权限掩码local_umask=022#禁止匿名用户上传anon_upload_enable=NO #禁止匿名用户建立目录anon_mkdir_write_enable=NO # Set Open Directory banner function dirmessage_enable=YES # Set turn on logging function xferlog_enable=YES #设定端口20进行数据连接connect_from_port_20=YES #设定禁止上传文件更改宿主chown_uploads=NO #设定vsftpd服务日志保存路劲. Note: The file default is not pure, you need to touch manually, and because the host user who changed the VSFTPD service is a manually established VSFTPD, you must pay attention to giving the user read access to the log or the service fails to start. Xferlog_file=/var/log/Vsftpd.log #设定日志使用标准的记录格式xferlog_std_format=YES #设定空闲链接超时时间, this uses the default/seconds. #idle_session_timeout= -#设定最大连接传输时间, where the default is used, the specific values are reserved for each user, the default/sec data_connection_timeout=3600#设定支撑vsftpd服务的宿主用户为手动建立的vsftpd用户. Note: Once the host user is changed, a read-write assignment to the read-write file associated with the service is required. Nopriv_user=vsftpd #设定支持异步传输的功能 #async_abor_enable=YES #设置vsftpd的登陆标语ftpd_banner=Hello Welcome Login #禁止用户登出自己的ftp主目录chroot_list_enable=NO #禁止用户登陆ftp后使用ls-R command. This command can be costly to server performance and can be a threat to the server if it runs when multiple users use the command. Ls_recurse_enable=NO #设定vsftpd服务工作在standalone模式下. The so-called standalone mode is that the service has its own daemon, in PS-a You can see the vsftpd daemon name. If you do not want to work in standalone mode, you can choose Superdaemon mode, comment out, in this mode vsftpd will not have its own daemon, but by the Super Daemon xinetd full agent,>at the same time, many features of the VSFTPD service will not be implemented. Listen=YES #设定userlist_file中的用户将不能使用ftpuserlist_enable=YES #设定pam服务下的vsftpd验证配置文件名. Therefore, Pam validation will refer to the/etc/pam.d/under the vsftpd file configuration. Pam_service_name=vsftpd #设定支持TCPwrapperstcp_wrappers=Yes ################################################ #以下是关于虚拟用户支持的重要配置项目, the default. conf configuration files do not contain these items and need to be added manually. #启用虚拟用户功能guest_enable=YES #指定虚拟的宿主用户guest_username=virtusers #设定虚拟用户的权限符合他们的宿主用户virtual_use_local_privs=YES #设定虚拟用户个人vsftp的配置文件存放路劲. In this designated directory, the profile of each virtual user's personality will be stored, with the note that the configuration file name must be the same as the virtual user name. User_config_dir=/etc/vsftpd/vconf #禁止反向域名解析, if you do not add this parameter may appear the user login is slow, or customer link is not on the FTP phenomenon reverse_lookup_enable=no
Configuration Content

In most cases where the IPv6 is not configured, please comment out listen_ipv6=yes

Restart the VSFTPD service after the modification is complete

1 [[email protected] ~]#/bin/systemctl restart Vsftpd.service

Fourth Step: Establish FTP Virtual login account

Refer to the third step here

Installation and configuration of Linux vsftpd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.