Activities

December 2013
M T W T F S S
« Nov   Jan »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

CentOS : Configure FTP server in 5 minutes

This is fairly very simply to set up using CentOS server. We can be completed in less than 5 minutes. Are you surprised ??

Here we go,

My scenario is showing below

A. My server hosted in Amazon cloud
B. Firewall is set to FTP traffic,
a. Disable passive mode connectivity,
b. FTP port : 21
c. Data port is 50000-55000.
d. Disabled passive mode connectivity.

Installation steps

1. Install vsftp package using yum package manager

[root@rc090 /]# yum install vsftpd
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package         Arch          Version                      Repository     Size
================================================================================
Installing:
 vsftpd          i686          2.2.2-11.el6_4.1             base          157 k
Transaction Summary
================================================================================
Install       1 Package(s)
Total download size: 157 k
Installed size: 344 k
Is this ok [y/N]:

2. Edit the vsftpd.conf file update the following entries,

a. Add the following lines at the end of /etc/vsftpd/vsftpd.conf file.

 chroot_local_user=YES
   pasv_enable=NO
   pasv_min_port=50000
   pasv_max_port=55000

b. Comment the following lines

  #anonymous_enable=YES
          #data_connection_timeout=120

3. Restart the VFTPD service

[root@mail ~]#chkconfig vsftpd on
[root@mail ~]# service vsftpd restart
Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd:                                [  OK  ]
[root@mail ~]#

How to create a ftp user

[root@rc090 /]# useradd  ftpuser
[root@rc090 /]# passwd ftpuser
Changing password for user ftpuser.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.

How do I test ftp connectivity

[root@rc090 /]# ftp -d 192.168.0.90
Connected to 192.168.0.90 (192.168.0.90).
220 (vsFTPd 2.2.2)
Name (192.168.0.90:root): ftpuser
---> USER ftpuser
331 Please specify the password.
Password:
---> PASS XXXX
230 Login successful.
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>