Wednesday, September 3, 2014

Linux Servers : How to configure FTP server in CentOS 6.3 – vsftpd server

How to configure FTP server in CentOS 6.3 – vsftpd server

How to configure FTP server in CentOS 6.3 – vsftpd server
vsftpd, which stands for “Very Secure FTP Daemon”,vsftp is an FTP server for Unix-like systems, including Linux. It is licensed under the GNU General Public License. It supports IPv6 and SSL.
vsftpd supports explicit (since 2.0.0) and implicit (since 2.1.0) FTPS.
vsftpd is the default FTP server in the Ubuntu, CentOS, Fedora, NimbleX, Slackware and RHEL Linux distributions.
This tutorial is applicable to all CentOS and Red Hat server. (CentOS 3,4,5 and 6) .
In this post I will show you how to configure a vsftpd server and how the system user can login in ftp server.
The user will bydefault login into its home directory in Server.
FTP protocol: 20 and 21
We will only edit the /etc/vsftpd/vsftpd.conf file. We are not editing any other file related to vsftpd package.
Before this the practical has been tested in freshly installed CentOS 6.3 with the given below features -
Operating System : CentOS release 6.3 (Final)
Kernel : Linux localhost.localdomain 2.6.32-279.el6.i686 #1 SMP Fri Jun 22 10:59:55 UTC 2012 i686 i686 i386 GNU/Linux
vsftpd rpm package : vsftpd-2.2.2-11.el6.i686
Selinux : On
This is my server information:
Now start working on vsftp server.
Step 1: Install vsftpd package in server.
Step 2: Now take the backup of original vsftpd.conf file .(It is good practice to keep backup of original file)
Step 3 : I have edited only this value anonymous_enable=YES and made as anonymous_enable=NO
Step 4: Now in vsftpd.conf file only the given below parameters are uncommented.
Note: command egrep -v “^#|^$” vsftpd.conf helps to find only uncommented line and blank line in vsftpd.conf file. In vsftpd we use # to comment hence ^# is used for any line starting with #.
(Read about REGEX for these symbols :) , I will explain this in different post.)
Step 5:Allowing user to login at its home directory through disabling selinux for particular requirement.
Step 6: Edit the iptable file for permanent setting.
Allowing the port no. 21 and 20 for ftp Server.
After editing restart the iptable.
Start the vsftp server
Step 7: Create a user in server and set its password.
Step 8: now try to login from ftp client.
from linux : use the command
. Give user name and password.
from windows : filezilla or any other windows ftp client.
For given below reference there was no editing in other important file.

No comments: