FTP (File Transfer Protocol)
Part 1
File Transfer Protocol :
FTP (File Transfer Protocol) is a network protocol for transmitting files between computers over Transmission Control Protocol/Internet Protocol (TCP/IP) connections. Within the TCP/IP suite, FTP is considered an application layer protocol.
In an FTP transaction, the end user’s computer is typically called the local host. The second computer involved in FTP is a remote host, which is usually a server. Both computers need to be connected via a network and configured properly to transfer files via FTP. Servers must be set up to run FTP services, and the client must have FTP software installed to access these services.
Configuration :
Server Site
First Check Your Local Yum Repository LIst
Package Requirement
ftp , vsftpd
Now go to the vsftpd Configuration file & Change some configuration
Path : /etc/vsftpd/vsftpd.conf
Start and Enable the Services
Now Add the Services to the Firewall
Now let’s just put some file in the default FTP File Location /var/ftp/
Client Site
Now access the ftp server
In my case it is Linux , You can use Windows To :)
Open a Terminal Make Sure all the Packages in client site also installed Like (vsftpd ,ftp)
Username: anonymous
Passwd: Blank {Because we allow anonymous share log in enabled }
Now let just see those two files are located or not
Some Command Explanation that are frequently Used :
get : To download file from the server to the client end
put : To upload files from the client to the server end
mget : To Download Multiple files from the server to client site
mput : To upload Multiple Files from the Client to server
AdditionalConfiguration
1. You can change the anonymous user login by entering NO in the /etc/vsftpd/vsftpd/conf But it’s not recommended in the actual enviroment because due to that client can access the home directory of the particular user of the server site end so it’s better to enable the anonymous log in share
2. You can change the default ftp file location i.e /var/ftp to anything else like this :
(2.1) First create a directory in home folder which you want to make a default folder for the ftp and put some changes in the vsftpd.conf file with anonymous login share Practical Explanation
Server Site Configuration
Restart the ftp service
But keep in mind that you there are plenty of malfunction arises if you login to this time because selinux will block your connection /Access
First check the default selinux configuration to the ftp default path
We have to change that using chcon command
Again restart the vsftpd service
First put some file in the new default path configuaration in server end
Server Site
Client Site
To Revert Change just comment this line in the configuration of ftp in server end
Done :)