Getting started with FTP - The File Transfer Protocol
Chapters
Getting started with FTP - The File Transfer Protocol, is a video course that is subdivided into multiple parts including
- Welcome note
- Prerequisites
- What is FTP
- Installing FTP server on Linux server
- Connect to FTP server using a GUI client
- Connect to FTP server using web browser.
- Connect to FTP server using windows explorer.
- FTP command line
- SFTP - A secure way of transferring data
- Wrapping up
I hope that you will learn from it, After taking this course, if you have any feedback, please send it through.
Author: Subject Coach
Added on: 8th Jan 2015
Please get in touch with your teacher or tutor in case you have a question related to this lesson
None just yet!
In this chapter, I will show you how to install FTP server on a Linux server. I am using CentOS 7, I will install VSFTPD on this server.
Let's do that by using yum, yum is a inbuilt package manager, that is shipped with CentOS and other Red Hat based Linux flavors.
To install VSFTPD, type in command as,
yum, install, VSFTPD.
This will install VSFTPD.
Next, we will quickly check our VSFTPD config file. VSFTPD config is generally located under E T C / VSFTPD folder.
Three settings we are initially looking at are,
first, anonymous underscore enable should be YES. This setting allow anonymous FTP.
second, write underscore enable should be YES. This setting will allow to accept write commands.
third, local underscore enable should be YES. This setting allows local accounts to login.
Save your changes and exit. Restart VSFTPD service.
Quickly open windows explorer, or a browser and type ftp://192.168.1.73 in address bar. You will be in, but because there are no files under default ftp user folder, thus you won't be able to see anything.
Let's quickly block access to anonymous account by updating anonymous underscore enable setting in our config file to NO.
After saving the config file, restart VSFTPD service.
Go back to Windows Explorer and try to access our FTP server contents now. You will be asked to provide login details for a user.
anonymous user details will no longer be accepted now.
Let's now set our FTP server to limit access for a user to their home folder only.
Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server.
Change the chroot underscore local underscore user setting to YES.
Restart VSFTPD service.
Let's now add a user account on our server using user add command.
please note! I am using switch -s followed by /sbin/nologin because I don't want to give new user any shell access.
After adding new user, I will set his password.
Quickly open windows explorer, or a browser and type ftp://[ftp server address] in address bar.
Type in the username and password of our newly created user. You will be in and will be able to see content of my home folder.
Let's create a file inside FTP folder under my home folder.
Now, when I refresh my windows explorer window, I will be able to see file I created.
One last thing before we proceed to next chapter, We would like to enable PASV mode for our FTP server.
Passive mode is generally used in situations where the FTP server is not able to establish the data channel. One of the major reasons for this is network firewalls.
In passive mode FTP, the client initiates command and data connections to the server, solving the problem of firewalls filtering the incoming data port connection to the client, from the server.
I will now add three more settings to our VSFTPD config file.
First, PASV underscore enable, with value YES.
First, PASV underscore min underscore port, with value 10090.
First, PASV underscore max underscore port, with value 10100.
You can choose your own port range. Make sure that you will need to open these ports through your server firewall.
Restart your VSFTPD service. We are all set now.
In next chapter, I will show you how to connect from a FTP client to our FTP server on Windows Operating system using FileZilla.