Skip to main content

Transfer files through FTP

 


FTP: Its a standard network protocol used for the transfer of computer files between a client and server on the computer network. FTP is built on a client-server model architecture using separate control and data connections between client and the server.




protocol: Set of rules used by computers to communicate




default FTP port: 21




in this lecture we need 2 linux vms:




client: myfirstlinuxvm




server: linuxcentos7




login to server linuxcentos7:




1.become root.


2 rpm -qa| grep vsftpd: check if the ftp is installed or not


3. ping www.google.com: check if internet is working or not in the server.




4.yum install vsftpd: install ftp package if not installed. 5. rpm -qa | grep vsftpd: check if the ftp is installed or not.




6. cd /etc/vsftpd: go to vsftpd folder in etc directory.




7. ls -Itr: list out the content of vsftpd folder. (we need vsftpd.conf file).




8. cp -p vsftpd.conf vsftpd.conf.org: take the backup of the vsftpd.conf file. 9.vi vsftpd.conf: edit the file and make the following changes:




anonymous enable=YES (make this yes to no).

uncomment the below lines:


ascii_upload_enable=YES


ascii download_enable=YES


ftpd_banner=Welcome to FTP service.


Go to end of the file and add the below line:


use_localtime=YES


10. systemctl start vsftpd: start the vsftpd service

11. systemctl status vsftpd: check the status of the vsftpd service. 12. systemctl enable vsftpd: enable the service at the boot time.

13. systemctl stop firewalld stop the firewall 14. systemctl disable firewalld: disable the firewall at boot time.

15. systemctl status firewalld: check the status of the firewall.




login to the client myfirstlinuxvm:


1.login and become root

2.ping www.google.com: check the internet connectivity.

3. yum install ftp install ftp package (vsftpd package is for the server side)

4. become the normal user and go to home directory

5.touch kruger: create the file named kruger

6. write something in the kruger file

7.we need to transfer this krugar file from client to server.

8. ftp 192.168.1.58 (ip of the server): it will connect to the server.

9. It will open the ftp program.

10. put kruger: send the kruger from client to server.

11. bye: exit from ftp program

12. check the file in server if it is transfered or not.

Comments

Popular posts from this blog

Post build configurations on Redhat VM

  ************************************* Post build configuration on Linux VM: ************************************* Set the hostname. hostnamectl set-hostname <Servername> ***************************************** Network configuration : Make sure VM gets the ipv4 ip address either from DHCP or assign the static ip address to it.   Question : How to assign the static ip address to the linux machine using the nmcli ?  Answer: fire the below commands: nmcli device nmcli connection modify enpos3 ipv4.addresses 10.253.1.34/24 nmcli connection modify enpos3 ipv4.gateway 10.253.1.1 nmcli connection modify enpos3 ipv4.method manual nmcli connection modify enpos3 ipv4.dns 8.8.8.8 nmli connection down enpos3 nmcli connection up enpos3 ip address show enpos3 nmcli connection show ************************†****************** Register to RHΝ. Register to redhat network if the linux vm is redhat vm. subscription-manager register --org <org>  --activationkey <activat...

patching tasks

 Patching a Linux system is a critical task to ensure that the system remains secure, stable, and up-to-date with the latest features and fixes. Here’s a comprehensive guide to the tasks involved in Linux patching: 1. Pre-Patching Preparation Backup System : Ensure you have a full system backup, including critical data, configuration files, and applications. Test the backup to verify its integrity. Check Disk Space : Verify that you have enough disk space, particularly on /var , /tmp , and /boot partitions. Review Current Patch Level : Determine the current patch level and installed packages using package management tools like yum , apt , dpkg , or rpm . Check System Logs : Review system logs to identify any issues that might affect the patching process. Test in a Staging Environment : If possible, apply patches in a staging environment that mirrors production to identify potential issues. Notify Stakeholders : Inform stakeholders about the scheduled maintenance window and expecte...