Setup vsftpd Service on CentOS 6.5

vsftpd is a free FTP service for UNIX and linux systems. It is very stable, fast and secure ftp server. In this post, i will share how to setup sftpd Service on CentOS 6.5. The steps has been tested working fine with other version of CentOS 6.

1. Install vsftpd ftp service :

[root@server-05 ~]# yum install vsftpd -y

Example :

[root@server-05 ~]# yum install vsftpd -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.upsi.edu.my
 * extras: mirror.upsi.edu.my
 * updates: mirror.upsi.edu.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:2.2.2-11.el6_4.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package              Arch                 Version                         Repository          Size
====================================================================================================
Installing:
 vsftpd               x86_64               2.2.2-11.el6_4.1                base               151 k

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 151 k
Installed size: 331 k
Downloading Packages:
vsftpd-2.2.2-11.el6_4.1.x86_64.rpm                                           | 151 kB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : vsftpd-2.2.2-11.el6_4.1.x86_64                                                   1/1
  Verifying  : vsftpd-2.2.2-11.el6_4.1.x86_64                                                   1/1

Installed:
  vsftpd.x86_64 0:2.2.2-11.el6_4.1

Complete!

2. Install ftp client on linux :

[root@server-05 ~]# yum install ftp -y

3. Create local user1 to access ftp service.

[root@server-05 ~]# useradd user1
[root@server-05 ~]# passwd user1
Changing password for user user1.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

4. Add user1 into vsftpd userlist as below :

[root@server-05 ~]# vi /etc/vsftpd/user_list
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
user1

5. Disabled anonymous access:

anonymous_enable=YES

to below :

anonymous_enable=NO

6. Add the following to bottom of the config file. If userlist_deny=NO, only allow users in this file :

userlist_deny=NO

7. Update the following banner :

ftpd_banner=Welcome to ehowstuff FTP service.

8. Start vsftpd service :

[root@server-05 ~]# service vsftpd start
Starting vsftpd for vsftpd:                                [  OK  ]

9. Configure vsftpd daemon start automatically on booting :

[root@server-05 ~]# chkconfig vsftpd on

10. Test ftp service connection from windows client using user1 :


C:\>ftp 192.168.0.5
Connected to 192.168.0.5.
220 Welcome to ehowstuff FTP service.
User (192.168.0.5:(none)): user1
331 Please specify the password.
Password:
230 Login successful.
ftp> bye
221 Goodbye.

11. Test ftp service connection from linux client using user1 :

[root@server-05 ~]# ftp 192.168.0.5
Connected to 192.168.0.5 (192.168.0.5).
220 Welcome to ehowstuff FTP service.
Name (192.168.0.5:root): user1
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> exit
221 Goodbye.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *