Install and configure VSFTPd on Ubuntu 13.04 12.10 12.04 Debian

 Install and configure VSFTPd on Ubuntu 13.04 12.10 12.04 Debian

vsftpd

 

Step 1: Install VSFTPd on Ubuntu Server

root@ip-10-48-234-13:~# apt-get install vsftpd
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libjpeg-turbo8 libjpeg8 ttf-dejavu-core dbconfig-common libt1-5 fontconfig-config libxpm4 libgd2-xpm libfontconfig1
Use ‘apt-get autoremove’ to remove them.
The following NEW packages will be installed:
vsftpd
0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded.
Need to get 124 kB of archives.
After this operation, 342 kB of additional disk space will be used.
Get:1 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise/main vsftpd amd64 2.3.5-1ubuntu2 [124 kB]
Fetched 124 kB in 0s (175 kB/s)
Preconfiguring packages …
Selecting previously unselected package vsftpd.
(Reading database … 72368 files and directories currently installed.)
Unpacking vsftpd (from …/vsftpd_2.3.5-1ubuntu2_amd64.deb) …
Processing triggers for man-db …
Processing triggers for ureadahead …
Setting up vsftpd (2.3.5-1ubuntu2) …
vsftpd start/running, process 14731

Step 2: Modify Vsftp configuration

root@ip-10-48-234-13:/home# vi /etc/vsftpd.conf
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
ls_recurse_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
userlist_enable=YES
root@ip-10-48-234-13:/home#

Step 3: Create local user

root@ip-10-48-234-13:/home# useradd -m kevin.ngo2
root@ip-10-48-234-13:/home# passwd kevin.ngo2
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ip-10-48-234-13:/home#

Step 4: Allow chroot user

root@ip-10-48-234-13:/home# vi /etc/vsftpd.chroot_list
kevin.ngo2
kevin.ngo
root@ip-10-48-234-13:/home#
root@ip-10-48-234-13:/home# /etc/init.d/vsftpd restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service vsftpd restartSince the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop vsftpd ; start vsftpd. The restart(8) utility is also available.
vsftpd stop/waiting
vsftpd start/running, process 31249
root@ip-10-48-234-13:/home#

Step 5: FTP to Server

root@ip-10-48-234-13:/home# ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.3.5)
Name (127.0.0.1:ubuntu): kevin.ngo2
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> exit
221 Goodbye.
root@ip-10-48-234-13:/home#

That’s it. Thanks for using IThelpblog.com.

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>