5.2 Client Connection

Source: Internet
Author: User
Tags ftp commands ftp site ftp client globalscape

After the VSFTP server is successfully installed and started, the client can use many tools to connect to the server. Therefore, this section describes the three most commonly used tools: ftp commands, browsers, and FTP applications.
Although these tools are used in different ways, they can achieve the file transfer function. We recommend that you be familiar with the most suitable tools for your daily work.
FTP command
Generally, most network operating systems, such as Linux or Windows systems, support the use of FTP commands. The biggest benefit is that you do not need to install any additional software, all FTP commands are directly supported by the operating system.
Although FTP commands are not as easy to use as graphical tools such as browsers or FTP applications, they can communicate with the FTP server through interactive access methods, for example, it is still an excellent FTP tool to request an FTP server to list files in a directory or transmit binary files.
This book assumes that the operating system of the client is Fedora Core 5 and the VSFTP server must be connected using commands. Open the terminal window and enter the following command format:

Ftp server name or IP address
Note:For more information about how to use the Windows operating system, see this step, because all FTP commands are almost identical on Linux and Windows operating systems.
After connecting to the VSFTP server, enter the account name and password to log on to the server or use Anonymous Access). The following is the connection content:
[Jack @ ns1 ~] $ Ftp ftp.fc5linux.com
# Enter the server address
Connected to ftp.fc5linux.com.
220 (vsFTPd 2.0.4)
# Server version
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (ftp.fc5linux.com: jack): jack
# Enter the user account name
331 Please specify the password.
Password:
# Enter the user account password
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
Ftp>
# Successfully logging on to the VSFTP Server
In addition to using the ftp command directly, you can also use the open command to connect to the FTP server. The following is an example of the connection:
[jack@ns1 ~]$ ftp
ftp> open
(to) ftp.fc5linux.com
Connected to ftp.fc5linux.com.
…………
After successfully logging on to the VSFTP server, you can enter "?" under the ftp> prompt symbol. To list all available commands. If you only want to query the description of a command, Directly add the command name.
Ftp>?
# List all available commands
Commands may be abbreviated.  Commands are:

! cr mdir proxy send
$ delete mget sendport site
account debug mkdir put size
append dir mls pwd status
………
ftp> ◆ get

# View a command description
get  receive file
The above are all ftp-supported commands, some of which are the same as those on Windows or MS-DOS operating systems, if you are interested, you can query their usage one by one, this book only sorts out commonly used ftp commands for your reference.
◆? : Displays the command name and description.
◆! : Indicates executing local commands. For example, dir Displays the directory content on the ftp server,
But! Dir Displays the directory content of the client computer.
◆ Ascii: it is transmitted in ASCII mode and is generally used to transmit plain text files.
◆ Binary: Transfers files in binary mode. It is generally used to transfer non-plain text files.
◆ Bye: end the ftp transmission mode.
◆ Cd: Switch the directory on the ftp server.
◆ Close: close the ftp server.
◆ Debug: change to debug mode.
◆ Delete: delete files on the remote host.
◆ Dir: displays the list of files and subdirectories in the directory.
◆ Get: download an object.
◆ Hash: The current file transfer progress is indicated by the "#" symbol.
◆ LCD: switch to the directory on the ftp client computer.
◆ Ls: displays the list of files and subdirectories in the directory.
◆ Mdelete: delete files on multiple remote hosts.
◆ Mget: Download multiple files.
◆ Mkdir: Add a subdirectory.
◆ Mput: upload multiple files.
◆ Open: open the ftp server.
◆ Prompt: the prompt string is displayed before the file is transferred.
◆ Put: upload an object.
◆ Pwd: displays the current directory name.
◆ Quit: Leave the FTP server.
◆ Rmdir: Delete the subdirectory.
◆ Rename: rename the file.
◆ Rmdir: Delete the directory on the remote host.
◆ Status: displays the current status information.
◆ Type: sets the file transmission mode.
◆ User: Transfers user account information.
Based on the above commands, this book provides an example, which contains many common commands. You may wish to exercise more to increase the proficiency of commands.
Ftp> ls-al
# Display the list of all files and subdirectories in the directory
227 Entering Passive Mode (192,168, 0,118)
150 Here comes the directory listing.
Drwx ------ 16 500 500 4096 Mar 24.
Drwxr-xr-x 3 0 0 4096 Mar 22 ..
-Rw ------- 1 500 500 0 Mar 23. ICEauthority
............
226 Directory send OK.
Ftp> pwd
# Display the current directory name
257 "/home/jack"
Ftp> ascii
# Transmission in ASCII mode
200 Switching to ASCII mode.
Ftp>! Mkdir public
# Add a client subdirectory
Ftp> LCD public
# Switch to the directory on the client
Local directory now/home/jack/public
Ftp> get 5-4.tif
227 Entering Passive Mode (192,168, 0,118)
150 Opening BINARY mode data connection for 5-4.tif (68334 bytes ).
WARNING! 397 bare linefeeds encoded ed in ASCII mode
File may not have transferred correctly.
226 File send OK.
68334 bytes encoded ed in 0.024 seconds (2.8e + 03 Kbytes/s)
Ftp> binary
# Binary transmission
200 Switching to Binary mode.
Ftp> bye
# End ftp transmission mode
221 Goodbye.
[Jack @ ns1 ~] $
Note:For more information about how to use the Windows operating system, see the preceding section, because all FTP commands are almost identical on Linux and Windows operating systems.
Browser
A browser is an indispensable tool for most people to access the Internet. In addition to the Web browsing function, it is also one of the most convenient client tools to connect to the FTP server. Using a browser to connect to an FTP server is similar to browsing a webpage. The only difference is that you must add ftp: // before the URL, instead of the http: //, as shown in Figure 5-4. This is an example of connecting IE 6.0 to the FTP server. Many folder icons appear in this screen. If you have sufficient permissions to read and write data, you can drag and drop the folder by using the mouse, transmits data between the client computer and the server.
In addition, the server and user name are displayed on the left. It is worth noting that the currently displayed user name is "anonymous", but we did not enter any user name during connection, why does this message appear on the screen?
In fact, anonymous means that if a user uses anonymous as the login account name and the email address as the password, the client can establish a connection with the server to access files and programs.
Figure 5-4 Use a browser to connect to the FTP server
With the use of anonymous account names, users can bypass security checks to access resources on remote servers. Currently, browsers have the default function of anonymous access, therefore, you can access the server without entering account data.
Anonymous access is quite convenient in FTP server management, because by default, all users can use this account to read files in the specified shared directory and download files.
However, anonymous accounts are not allowed to upload files, because this directory is shared by all users. If the write permission is allowed, users can not only write files to this directory, but also delete all files, this may cause disadvantages in server management.
To solve the preceding problems, you still need to ask the client to log on with a personal account. After Successful Logon, the browser automatically connects to the user's home directory and has full access permissions to the directory, for example, read, write, or execute.
To enter the user account name and password in the browser, you must use the following format:
Ftp: // User name: password @ FTP server address
When entering the preceding information, note that you must use a colon :) to connect the "user name" and "password". At the same time, the connection cannot be blank. Otherwise, the connection may fail. Assume that the server and user information is as follows:
◆ User name: caroline.
◆ Password: lovely.
◆ FTP server address: ftp.fc5linux.com.
To meet the preceding requirements, enter the following URL in your browser, as shown in Figure 5-5.
Ftp: // caroline: lovely@ftp.fc5linux.com
FTP program
In addition to using ftp commands and browsers, when connecting to the VSFTP server, there is also a third option-FTP program, there are currently many software for FTP development, for example CuteFTP, WS-FTP or Bullet Proof FTP. This book will describe the use of common FTP applications using the popular CuteFTP example here. First, you can download the CuteFTP 7 Professional trial version from the following website:
Ftp://ftp.globalscape.com/pub/cuteftppro/cuteftppro.exe
Figure 5-5 enter personal user account data in the browser

After installation, run the start/Program/GlobalSCAPE/CuteFTP Professional/CuteFTP 7 Professional option. If this is the first time you use it, a series of wizard windows will appear, as shown in Figure 5-6, to help you set options for connecting to the FTP server.
1) Name the FTP server to be connected, such as VSFTP.
2) enter the FTP server name or IP address, for example, ftp.fc5linux.com, as shown in Figure 5-7.
3) enter the account name and password used for connection. For anonymous access, enter anonymous as the account, and enter the password as needed, as shown in Figure 5-8.
4) enter the default directory opened on the local machine and server after the connection, as shown in Figure 5-9.
5) in the setting completion window, click "finish" to end the setting, as shown in Figure 5-10.
6) The system will then open the CuteFTP 7 Professional window, with Site Manager on the left, which features the same as the address book, and the directory on the FTP server on the right, as shown in Figure 5-11.
7) if you click the "Local Drives" tab in the lower left corner of the window, the Local directory content will appear on the left. You can drag and drop the mouse to transfer data between the client computer and the server, as shown in Figure 5-12.
Figure 5-12 view local directory content

8) You need to add other FTP server connections in the future. You can click File/New/FTP Site in the program window and enter necessary connection information in the displayed window, as shown in Figure 5-13.

BibliographyPrevious sectionNext section

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.