Friday, November 7, 2008

INSTALLATION and SET UP of FTP Server on Linux

On this blog I'll be showing you the steps on how to set up FTP Server in Linux specifically for CentOS/RedHat distro.

For this tutorial I'll be using VSFTP for our FTP server although you can choose to install other FTP server like ProFTP and

others.

What is VSFTPD by the way. VSFTPD is a very secure and fast FTP server for Linux. This is the reason why I chose it to be the

one to discuss in here. So let's get started.

1. First download the VSFTPD package and install it. In my case I just did it via yum

yum install vsftpd

2. Now once the vsftpd has been successfully installed, we can now start the vsftpd service. No worries the default

configuration settings of vsftpd are good to make the FTP server up and running. (But we'll do few more tweaks later on)

3. To start vsftpd issue

if sudoer

/sbin/service vsftpd start

if root

service vsftpd start

4. But don't forget to allow the necessary ports for FTP service. The following are the ports needed to be openned for FTP

Port no. Details
21 ftp port
20 ftp-data port (use for active mode FTP connection)
50000 - 50004 ftp-data (for passive mode) Note: it can be any port higher than 1024

5. Now we're going to add an FTP user

First add new group where FTP members will be in

groupadd ftp-users


6. Make directory from where FTP users will upload download anything

mkdir /home/ftp-docs

7. If the directory has been created or if a directory is already existing just set the permission and owner privileges

chmod /home/ftp-docs
chown root:ftp-users /home/ftp-docs

8. Then we'll add the ftp user

useradd -g ftp-users -d /home/ftp-docs user1
passwd user1

9. Now we can login to the FTP server via the user1 credentials we made. (You may use any FTP software client such like

Filezilla, WinSCP, ProFTP and others)

CHeers!!! And God Bless!!!!

No comments: