Installation configuration for FTP under Linux

Source: Internet
Author: User
Tags download file from ftp server ftp connection file transfer protocol

First, install the VSFTP

The FTPD packages commonly used in open source operating systems include VSFTP, ProFTPD, PUREFTPD, and WUFTPD.

VSFTPD is the abbreviation for "very secure FTP daemon", and security is one of its greatest features. VSFTPD is the name of a server running on UNIX-like operating systems, which can run on systems such as Linux, BSD, Solaris, Hp-unix and so on, is a completely free, source-coded FTP server software that supports many other FTP Features that are not supported by the server. For example: Very high security requirements, bandwidth constraints, good scalability, can create virtual users, support IPV6, high rate.

VSFTPD is the most respected FTP server program in the Linux distribution. Features are small and light, safe and easy to use.

Wiki attached to vsftp:

Https://en.wikipedia.org/wiki/Vsftpd


# yum-y Install VSFTPD # #直接yum安装

# systemctl Start Vsftpd.service # #启动vsftp服务器



Second, the configuration vsftp

The VSFTPD provides both standalone and inetd (inetd or xinetd) modes of operation. Standalone one-time start, the operating period has been resident in memory, the advantage is fast response to the access signal, the disadvantage is the loss of a certain system resources, often applied to the real-timely response to the high demand for professional FTP server; inetd on the contrary, the FTP process is called only when the external connection sends the request , so it is not suitable for applications that are connected to a large number of simultaneous systems. In addition, the inetd mode does not occupy system resources.


[Email protected] ~]# VI/ETC/XINETD.D/VSFTPD

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/B7/wKioL1XsAT7Srka4AAFUoZYHt64085.jpg "title=" QQ picture 20150906165251.png "alt=" Wkiol1xsat7srka4aafuozyht64085.jpg "/>


Wait = 0 indicates that the device is active, and it is using the standard TCP Sockets.


[Email protected] ~]# cat/etc/vsftpd/vsftpd.conf |grep ^[^#] # #查看其默认配置

Anonymous_enable=yes # #允许匿名账号登录

Local_enable=yes # #允许本地用户 (i.e. user account in Linux system)

Write_enable=yes # #允许本地用户对FTP服务器文件具有写权限

local_umask=022 # #设置本地用户默认文件掩码022

Dirmessage_enable=yes # #激活目录欢迎信息功能

Xferlog_enable=yes # #激活上传, download log file, default under/var/log/vsftpd.log

Connect_from_port_20=yes # #启用FTP数据端口的连接请求

Xferlog_std_format=yes # #以标准xferlog的格式书写传输日志文件

Listen=no # #关闭监听 (Open vsftpd will run in stand-alone mode, the VSFTPD itself listens and handles connection requests for IPV4 ports)

Listen_ipv6=yes # #开启IPv6端口监听

PAM_SERVICE_NAME=VSFTPD # #设置PAM外挂模块提供的认证服务所使用的配置文件名, namely/ETC/PAM.D/VSFTPD File

Userlist_enable=yes # # #允许ftpusers文件中的用户登录FTP服务器

Tcp_wrappers=yes # #使用tcp_wrappers作为主机访问控制方式 (tcp_wrappers

Host address-based access control for network services in Linux systems can be implemented


Client Login Verification:


Ubuntu Login:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/D2/wKioL1XuUQPR7fMGAAFooG7nWwY466.jpg "title=" QQ picture 20150908105805.png "alt=" Wkiol1xuuqpr7fmgaafoog7nwwy466.jpg "/>


Windows logon:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/D6/wKiom1XuUMbzbWt1AAE5Dk5eqWg800.jpg "title=" QQ picture 20150908110024.png "alt=" Wkiom1xuumbzbwt1aae5dk5eqwg800.jpg "/>


Web Login:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/D7/wKiom1XuVCfhfTB_AAEm3IbwDTQ247.jpg "title=" QQ picture 20150908111143.png "alt=" Wkiom1xuvcfhftb_aaem3ibwdtq247.jpg "/>


III. Application of Vsftp

By default, the root directory of the FTP is under the/var/ftp of the server.


[Email protected] ~]# echo "ABCD" >/var/ftp/123.txt

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/D7/wKiom1XuVtvDHeD1AAEu8VHsy84116.jpg "title=" QQ picture 20150908113227.png "alt=" Wkiom1xuvtvdhed1aaeu8vhsy84116.jpg "/>


1. Use the Help command to view assistance

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/D4/wKioL1XuWyThAPe0AADVQCmSo9Y129.jpg "title=" QQ picture 20150908113524.png "alt=" Wkiol1xuwythape0aadvqcmso9y129.jpg "/>


2. Use the put command to upload, get command Download (account: Anonymous, password is empty)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/D4/wKioL1XuWRvT6jHzAAFzY8CWmws928.jpg "title=" QQ picture 20150908112849.png "alt=" Wkiol1xuwrvt6jhzaafzy8cwmws928.jpg "/>


① prompt for file not found, reason: The file is not in the current directory, using the LCD command to view

② move the file to the current directory for upload operation, prompt 550, Reason: No open permission, cannot upload

③ download file from FTP server, prompt 226, download successful


3. Change the settings of the vsftp.conf to allow anonymous users to download:

# vi/etc/vsftpd/vsftpd.conf

Anon_upload_enable=yes # #允许匿名用户上传文件 (must be global write_enable=yes, default YES)

Anon_mkdir_write_enable=yes # #允许匿名用户创建目录

Use_localtime=yes # #使用本地时 (add it yourself)

anon_umask=022 # #设置匿名用户的掩码 (add it yourself)

Anon_other_write_enable=yes # #允许匿名用户删除和重命名权限 (add it yourself)


# mkdir/var/ftp/upload # Create a new directory under #在/var/ftp for anonymous user uploads

# chmod-r 777/var/ftp/upload/# #赋予其权限

# systemctl Restart Vsftpd.service # #重启vsftp

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/D8/wKiom1Xuc7SR6GeJAAJEF6GPLSU462.jpg "title=" QQ picture 20150908133453.png "alt=" Wkiom1xuc7sr6gejaajef6gplsu462.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/D4/wKioL1XudqbSupqPAAFv6koMAlg451.jpg "title=" QQ picture 20150908133850.png "alt=" Wkiol1xudqbsupqpaafv6komalg451.jpg "/>


Status code:

Success-----Login

-----Command executed successfully

-----File Status OK, open the data connection port

-----Directory Switch operation completed

226-----Close the data connection port, the requested file operation succeeded

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/D4/wKioL1XueMbgITP7AAFHqGRk2Ws183.jpg "title=" QQ picture 20150908134751.png "alt=" Wkiol1xuembgitp7aafhqgrk2ws183.jpg "/>



650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/D8/wKiom1XufEjTfEJaAABomoduP24873.jpg "title=" QQ picture 20150908141201.png "alt=" Wkiom1xufejtfejaaabomodup24873.jpg "/>

mkdir------> Create a catalog file

Delete------> Delete files

RM------> Delete catalog files


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/D5/wKioL1XufqKgsRPXAAE8bgtsYkY713.jpg "title=" QQ picture 20150908141258.png "alt=" Wkiol1xufqkgsrpxaae8bgtsyky713.jpg "/>

Attached 1:SFTP

SFTP is the abbreviation for secure file Transfer protocol, security File Transfer Protocol, which provides a secure encryption method for transferring files. SFTP is part of SSH, and in the SSH package, there is a secure file transfer subsystem called SFTP (secure Files Transfer Protocol), and SFTP itself does not have a separate daemon. It must use the sshd daemon (the port number by default is 22) to complete the corresponding connection operation, so in a sense, sftp is not like a server program, but more like a client program. SFTP is also used to transmit authentication information and transmitted data using encryption, so it is very safe to use SFTP.

The SFTP connection method is the same as the FTP connection method.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/D8/wKioL1XuqSyjUt1lAAJ2JEwcw-s084.jpg "title=" QQ picture 20150908171408.png "alt=" Wkiol1xuqsyjut1laaj2jewcw-s084.jpg "/>



Wiki with vsftp installed under 2:ubuntu:

Http://wiki.ubuntu.com.cn/Vsftpd


Detailed configuration of the attached 3:vsftpd

Http://os.51cto.com/art/201008/221842.htm


This article is from the Notepad blog, so be sure to keep this source http://wangzhijian.blog.51cto.com/6427016/1692834

Installation configuration for FTP under Linux

Related Article

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.