Connecting to FTP

From Hostek.com Wiki
Revision as of 17:04, 8 January 2015 by Coryme (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Types of FTP connections

There are three main types of FTP connections. That is using an FTP client, using your browser, and using the command prompt or shell script.

Connecting Using an FTP Client

An FTP client is a desktop program that does all of the heavy lifting involved with connecting and maintaining an FTP connection to a server. Most FTP clients have an FTP log on the top screen, a local file menu, and a remote file menu.

To connect to FTP Clients such as FileZilla and CuteFTP:

  1. Login to WCP to get your FTP Account information. (To learn more about WCP click Here)
  2. Open up the FTP Client
  3. In the Host box, type something like ftp.yourdomain.com or your site IP
  4. In the username box, type the username you grabbed from WCP or cPanel
  5. In the password box, copy the password you made
  6. (optional) In the port box, type in 21
  7. Click Connect

Connecting Using a Browser

Any browser nowadays has FTP functionality, but it tends to be limited. Nevertheless, to connect using your browser, you will want to do the following.

  1. Open your browser
  2. Type ftp://ftpusername:ftppassword@yourdomain.com into the URL box at the top
  3. Once authenticated you will see a list of the files in the default directory of your site

Connecting Using Command Prompt

  1. Search your computer for cmd.exe
  2. Run ftp yourdomain.com
  3. This will then promt you to enter in the username and password
  4. Once in, you will be able to use FTP commands to move and change files. Below is a list of available commands (Note: This is not complete)

ABOR – abort a file transfer
CWD – change working directory
DELE – delete a remote file
LIST – list remote files
MDTM – return the modification time of a file
MKD – make a remote directory
NLST – name list of remote directory
PASS – send password
PASV – enter passive mode
PORT – open a data port
PWD – print working directory
QUIT – terminate the connection
RETR – retrieve a remote file
RMD – remove a remote directory
RNFR – rename from
RNTO – rename to
SITE – site-specific commands
SIZE – return the size of a file
STOR – store a file on the remote host
TYPE – set transfer type
USER – send username

Connecting Using Linux

  1. Open your command lines tool
  2. Run ftp yourserver.com
  3. Type in your username and password in the prompt that follows
  4. Once in, use the below commands to move and edit files. (Note: this is not complete)

-p
Use passive mode for data transfers. Allows use of ftp in environments where a firewall prevents connections from the outside world back to the client machine. Requires that the ftp server support the PASV command. This is the default now for all clients (ftp and pftp) due to security concerns using the PORT transfer mode. The flag is kept for compatibility only and has no effect anymore.
-i
Turns off interactive prompting during multiple file transfers.
-n
Restrains ftp from attempting auto-login upon initial connection. If auto-login is enabled, ftp will check the .netrc (see netrc(5)) file in the user's home directory for an entry describing an account on the remote machine. If no entry exists, ftp will prompt for the remote machine login name (default is the user identity on the local machine), and, if necessary, prompt for a password and an account with which to login.
-e
Disables command editing and history support, if it was compiled into the ftp executable. Otherwise, does nothing.
-g
Disables file name globbing.
-v
Verbose option forces ftp to show all responses from the remote server, as well as report on data transfer statistics.
-d
Enables debugging.
bye
Terminate the FTP session with the remote server and exit ftp An end of file will also terminate the session and exit.
cd remote-directory
Change the working directory on the remote machine to remote-directory
delete remote-file
Delete the file remote-file on the remote machine.
dir [remote-directory ] [local-file ]
Print a listing of the directory contents in the directory, remote-directory and, optionally, placing the output in local-file If interactive prompting is on, ftp will prompt the user to verify that the last argument is indeed the target local file for receiving dir output. If no directory is specified, the current working directory on the remote machine is used. If no local file is specified, or local-file is -, output comes to the terminal.
get remote-file [local-file ]
Retrieve the remote-file and store it on the local machine. If the local file name is not specified, it is given the same name it has on the remote machine, subject to alteration by the current case ntrans and nmap settings. The current settings for type form mode and structure are used while transferring the file.


FileZilla 3.10 Login Issues

After the 3.10 update to FileZilla there is a possibility that connections to the server will get an error similar to the below.

Error 550: The supplied message is incomplete. The certificate signature is not verified.

If you see this error the workaround to this is to use Site Manager instead of the Quick Connection button.

To add your FTP connection to Site Manager:

  1. Click on File, Site Manager
  2. Click on My Sites on the left hand side
  3. At the bottom of that left column, click New Site
  4. On the right hand side fill out the connection information using the example information as a guide
    1. Host: ftp.yourdomain.com
    2. Port: 21
    3. Protocol: FTP - File Transfer Protocol
    4. Encryption: Use plain FTP
    5. Logon Type: Normal
    6. User: (See WCP for this information)
    7. Password: (See WCP for this information)