This tutorial explains how to configure FTP Server and FTP client in Linux With Step by Step with Realtime Examples, images and videos. Learn how to configure Anonymous User Account and Normal user account with download option in FTP SERVER. We can allow or restrict local users to login in home directories through FTP and We use FTP chroot feature to keep users in allowed directories only.
FTP = File Transfer Protocol
PORT = 20,21
As a linux Administrator We should know
- FTP stand for File Transfer Protocol.
- The FTP does not require to login directly into the remote host
- FTP transfer data without encryption
- vsftpd is the only stand-alone FTP distributed With RHEL
- Then vsftpd stand for Very Secure FTP Daemon
- The vsftpd is secure, fast and stable version of FTP
- vsftpd efficiently handle large numbers of connection securely
- You should use SFTP instead of FTP while transferring data over public network like Internet
We Can Access FTP SERVER Through 2 User Accounts
1) Anonymous Account
2) Normal User Account
Install and configure FTP server in Redhat/Centos Linux
Commands to Install Ftp
# yum install vsftpd # service vsftpd start # service vsftpd status
# yum install vsftpd # service vsftpd start # service vsftpd status
Configuration
One thing to consider after installing VSFTP is that if we want anonymous-login on our ftp or not.
Firstly, we will discuss to configure with anonymous disabled & later we will also discuss enabling anonymous-login. Now, lets move on to configuring VSFTP. Open configuration file for vsftp
# vi /etc/vsftpd/vsftpd.conf
then disable anonymous access , change following parameter to no
anonymous_enable=NO
and change following parameter to yes
local_enable=YES
Then, restart server to implement changes
# service vsftpd restart # chkconfig vsftpd on
That’s it, our secure FTP is ready . Now lets try to access it
Accessing FTP and Accessing VSFTP through browser
ftp://192.168.1.100 or ftp://ftp.linuxstories.com
Then Accessing VSFTP through Command line
ftp://192.168.1.100
To use VSFTP in Command line, use following commands
get = filename to download a file
put = filename to upload a file
bye = to exit/quit ftp
LAB Exercises For RHCE Exam Objective
- Configure anonymous-only download [RHCE exam objective]
- To Configure FTP server to allow anonymous access, chrooted to /var/ftp
- Then Configure FTP Server to all local users except user vikram to ftp in server
- Download/upload must be allowed for these users and the users must be chrooted on their home directory