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

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...

Linux Prepatching tasks

 Pre-patching tasks in a Linux environment are critical to ensuring a smooth and successful patching process. These tasks help in minimizing downtime, preventing issues during the patching, and ensuring the system's stability. Here’s a checklist of common pre-patching tasks you should perform: 1. Backup Critical Data Full System Backup : Perform a full system backup, including configuration files, databases, and critical application data. Verify Backup Integrity : Ensure that the backup is complete and can be restored if necessary. 2. Review Patch Notes Understand the Patch : Review the release notes and documentation for the patches you plan to apply. Understand what is being updated and any potential impact on your system. Check Dependencies : Verify that all dependencies for the patches are met, including hardware, software, and configuration requirements. 3. Check System Health Disk Space : Ensure there is sufficient disk space available, especially on /var , /tmp , and /boot ...