8. FTP: two types of text transmission mode and two types of ftp

Source: Internet
Author: User
Tags ftp client

8. FTP: two types of text transmission mode and two types of ftp
I. Basic Knowledge

1. FTP is one of the TCP/IP protocol families, referred to as the file transfer protocol. It is mainly used for remote file transmission, such as file upload and download.

2. The following uses the VSFTP server as an example.

Users of VSFTP servers have three forms:

Anonymous user: the username is FTP or anonymous. The password is blank and the working directory is/var/ftp.

Local User: Linux User (but not the root user by default). The access root directory is the main directory of this user.

Virtual User: saves the user name and password in the database file or database server.

3. FTP text transmission modes include ASCII transmission mode (text mode) and binary transmission mode (binary)

ASCII transmission mode: This mode is suitable for text transmission. It can be automatically stored as a local text file when data of different types of operating systems are transmitted,

However, it is not suitable for transfer programs, databases, word processing files, compressed files, and other non-text files.

Binary transmission mode: Suitable for transferring programs, databases, word processing files, compressed files, and other non-text files

You can use the bin command on the FTP client to switch to the binary transmission mode,

Use the ascii command to switch to the ASCII Transmission Mode

 

2. download files in two modes

1. [root @ localhost root] # chkconfig -- list vsftpd (view the status of enabling vsftpd)

Vi/etc/vsftpd. conf

Ascii_upload_enable = YES
Ascii_download_enable = YES
(Remove the # sign in front of the two above) as shown in Figure

Service vsftpd restart
Disable vsftpd: [OK]
Start vsftpd For vsftpd: [OK]

Switch 4、to yanji,create word.txt

[Root @ localhost root] # su-yanji

[Yanji @ localhost yanji] $ cat> word.txt
First line
Row 2
Row 3

5. Start download

Method 1 (binary transmission mode)

In Windows Resource Manager, enter ftp: // 192.168.170.4/in the address bar and press Enter.
File-> log on, enter the account and password to log on (except for the root user)

No line breaks)
Go to disk D to view

Normal display

 

3. upload files in two modes

Upload the word.txt of the d drive to FTP

Command Line in windows (or in Linux)

Method 1 (binary transmission mode ):

In Windows Resource Manager, enter ftp: // 192.168.177.4 in the address bar and press Enter.
File-> log on, enter the account and password to log on (except for the root user)
Copy, paste, or drag an object.

 

However, in Linux

If word.txt encoding is not a UTF-8, it will be garbled

Style is also a problem

 

Method 2:

This result is the same as above.

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.