Pages

Monday, 15 March 2021

How to configure FTP Server in Ubuntu using User authentication & anonymous

 What is FTP ?

File Transfer Protocol (FTP) is a standard Internet protocol for transmitting files between computers on the Internet over TCP/IP connections.

FTP is a client-server protocol that relies on two communications channels between client and server: a command channel for controlling the conversation and a data channel for transmitting file content. Clients initiate conversations with servers by requesting to download a file. Using FTP, a client can upload, download, delete, rename, move and copy files on a server. A user typically needs to log on to the FTP server, although some servers make some or all of their content available without login, also known as anonymous FTP.

How to configure FTP Server in Ubuntu using User authentication

sudo apt-get update

sudo apt-get install vsftpd (very secure file transfer protocal)

ip a (internet protocol address)

here we need to open  url and then type ftp:\\<networkid which is gathered from ip a above command>

sudo adduser ftpuser

sudo systemctl restart vsftpd

now if we refresh the above url we will find the user access upto providing the ftpuser with password

how to dump the file into url 

cd /home/ftpuser/

ls

examples.desktop

sudo mkdir share

sudo touch file 

now after refresh the url we will see the file and directory that we created using mkdir and touch

cd /etc

sudo nano ftpusers

if we add this ftpuser in the above file ftpusers it will now stop to access 

sudo systemctl restart vsftpd

sudo ufw status 


How to configure FTP Server in Ubuntu using anonymous

sudo apt-get update

sudo apt-get install vsftpd (very secure file transfer protocal)

ip a (internet protocol address)

here we need to open  url and then type ftp:\\<ipaddress which is gathered from ip a above command>

sudo nano /etc/vsftpd.conf

now you need to change anonymous_enable=NO should be changed into anonymous_enable=yes

sudo systemctl restart vsftpd

sudo systemctl enable vsftpd

sudo systemctl status vsftpd

now if we refresh the above url we will find the Name Size LastModified has empty 

however if we need to dump the file into url 

cd /srv/ftp

sudo mkdir share

sudo touch file 

now after refresh the url we will see the file and directory that we created using mkdir and touch



No comments:

Post a Comment

Friends-of-friends-Map Reduce program

Program to illustrate FOF Map Reduce: import java.io.IOException; import java.util.*; import org.apache.hadoop.conf.Configuration; import or...