How to Install and Configure FTP Server in Ubuntu 16.04, 17.04 , 18.04, 19.04
How to Install and Configure FTP Server in Ubuntu 16.04, 17.04, 18.04, 19.04
FTP is used to share files and folder over the network it works on 21 port with TCP protocol. FTP is used by many Organizations and Companies on their on-premise network as well as public network to share files.
Now Lets Configure FTP server with anonymous access with anonymous access any one in our network will be able to access our FTP server without any username or password based authentication.
1) Install Packages.
sudo apt install vsftpd -y
2) set anonymous access to YES in /etc/vsftpd.conf file.
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# Allow anonymous FTP? (Disabled by default).
after you edit the file press "Ctrl + O" , press enter & "Ctrl + X"
by setting Anonoyomus=YES will make our ftp accessible without any authentication
3) Start and Enable the service.
sudo systemctl enable vsftpd
4) Now we can access our FTP server on web browser.
5) Now lets upload files and folder to share on our FTP Server. The Directory in which we need to upload the files to share is /srv/ftp .
I am creating a file to share.
sudo touch /srv/ftp/file
put all your files and folder under /srv/ftp which you want to share.
6) Now let's Access it on the browser.
now anyone on our network can access our FTP server and download or access our file.
7) Our Clients can also access our FTP Server by cli (i.e. terminal)
Connected to 192.168.122.23.
220 (vsFTPd 3.0.3)
Name (192.168.122.23:gaurav): anonymous
331 Please specify the password.
Password: Just Press Enter
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 0 0 0 Jan 30 20:27 file
226 Directory send OK.