Browse
 
Tools Add
Rss Categories
-->

FTP Server Setup Guide

Reference Number: AA-04477 Created: 2012-12-11 03:15 Last Updated: 2012-12-11 03:19 0 Rating/ Voters

 

 

Setup FTP

 

 

Contents


Goals............................................................................................................................................. 2

What is FTP? FTP port and the usage............................................................................................ 2

How to install an FTP service in CentOS?...................................................................................... 2

How to install an FTP service in Ubuntu?........................................................................................ 4

How to create an FTP user?........................................................................................................... 4

Make sure the port is up................................................................................................................ 6

How to connect via FTP from a Linux System?............................................................................... 6

How to connect via FTP from Windows?....................................................................................... 8

Conclusion................................................................................................................................... 10


 

 

 

 

 

 

 

 

 

 

 

 

Goals

This guide will help you understand how to setup FTP (File Transfer Protocol) on your system, how to create FTP users, and how to access system resources using FTP from a remote system. After going through the sections below, you will be able to manage an FTP server and will be able to access system resources from a remote location. By default, most Linux systems include one installed FTP server package. The most commonly used FTP services are ProFTPD and vsftpd.

 

What is FTP? FTP Port and Usage

 

FTP (File Transfer Protocol), as the name implies, is mainly used to transfer data or resources to and from a remote location. The default port for sending commands is 21, and the default data sending port is 20. Therefore, before starting, make sure that FTP port 21 is open. You can telnet to your sever to know if the port is up.

How to Install an FTP Service in CentOS

 

In this section we are going to install the vsftpd FTP service on your CentOS system. The easy way to do this is by using the yum installation utility.  Please follow the steps below. (To install any other FTP service simply replace vsftpd with that FTP service name.)

1)     Open the terminal or shell (the command line).

2)     Type the following command to install the vsftpd service in your system:

3)     The vsftpd package will be installed from the specified repository. Please type “y” to start the installation.

4)     After installation, you will have to start the vsftpd service.

5)     You can use chkconfig command to start the service up after every reboot.


6)      Now you have successfully installed and setup vsftpd service on your system.

How to Install an FTP Service in Ubuntu

 

In this section we are going to install the vsftpd FTP service on your Ubuntu system. The easy way to do this is by using the apt-get installation utility. (To install any other FTP service simply replace vsftpd with that FTP service name.)

1)      Open the terminal or shell (the command line).

2)      Type the following command to install vsftpd service on your system:

apt-get install vsftpd

3) The service will be automatically enabled by default. Now you have successfully installed the vsftpd service on your Ubuntu system.

How to Create an FTP User

(Note: FTP user creation steps are the same in both the CentOS and Ubuntu systems.)

1)     Open the terminal or shell (the command line). Then, type the following command to create the FTP directory that you want to upload and download files to. (Kindly ignore steps 1 to 2 if you already have a directory with the necessary permissions.)

mkdir <FTP user home or the directory that you want to upload and download files to>

Eg. If the FTP user home or the directory that you want to upload and download files to is “/home/ftp_folder”, then the command will be as follows:

2)     Give necessary permissions to the folder. If you want full permissions for every user for the FTP directory, including the sub-directories, the command will be as follows:

3)     Now we can create the FTP user. The command is given below.

useradd -d <FTP user home or the directory that you want to upload and download files to> <ftp user name>

Eg. If the user name is “ftp_test” and the ftp user home or the directory that you want to upload and download files is to “/home/ftp_folder” (always make sure the directory exists with necessary permissions for the FTP user), then the command will be as follows:

3)     Prove the password of the created account.

passwd <created ftp user name>

Eg. To give password for the created user “ftp_test”, the command will be as follows:

passwd ftp_test

3)     Now you have successfully created a FTP user in your system.

Make Sure the Port Is Up

(Note: These steps are same in both the CentOS and Ubuntu systems.)

Before connecting via FTP, always make sure that FTP port 21 is open. Otherwise, you will not be able to make a FTP connection to your server. You can telnet to your sever to find out if the port is up.

To telnet, please type the command below:

telnet <system IP or hostname> 21

If the port is open, you will receive the below screen saying that you have connected to the system.

To close the connection type “quit” and then press “enter” key.

How to Connect via FTP From a Linux System

(Note: These steps are the same in both the CentOS and Ubuntu systems.)

1)     Open the terminal or shell (the command line). Then, use the following command to connect to your system via FTP:

ftp <IP address or hostname of the system that you want to connect via FTP>

Eg. If the IP address of the system that you want to connect to via FTP is 10.0.0.239, then the command will be as follows:

2)     A prompt will be given for the username. Please provide the FTP user name there.

3)     Then, you will receive the prompt for the FTP user password. Please provide the password there to connect to the system.

4)     Type the FTP command “ls” (to list files) to make sure the connection is successful.

 

5)     Now you have successfully connected to your system via FTP.

 

How to Connect via FTP from Windows

 

If you are on a Windows PC, then how you will connect via FTP? Well, there are a number of FTP client software available on the market and most of them are free to use. An example of such a client is FileZilla. In this section we will discuss how to connect to a remote PC via FTP using the FTP client FileZilla.

1)   First, you have to install FileZilla software on your system.

You can go to the official FileZilla website for downloading the latest FileZilla client version. (http://filezilla-project.org/).

2)   After installation, simply click on the FileZilla icon to execute the program.

3)   Now you will receive the “FileZilla” connection screen.

4)     To connect, all you require is the remote system IP or host name, FTP user name, and user password. (Please also specify the FTP port if the system is not using default port 21. Otherwise, there is no need to specify the port; FileZilla will look for the default port automatically.)

5)     Click on the Quickconnect icon to connect to the system.

6)     Now you have successfully connected to the system via FTP from your Windows PC.

 

 

Conclusion

 

You should now be able to successfully connect to your remote system via FTP, create FTP users, and access your system resources using FTP from a remote system. If you encountered any issues with this guide, please also note that there is additional information available in our Wiki database at http://myhosting.com/kb. Finally, we encourage you to contact our technical support team by email at vps@myhosting.com, or calling us at 1-866-289-5091 with any questions or concerns.

Rss Comments
  • There are no comments for this article.
Info Add Comment
Nickname: Your Email: Subject: Comment:
Enter the code below: