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

Linux basic commands

 Linux basic commands: du  -sh  *  |  sort  -h  -r   |  head  -n  40  :    list out first 40 files in the directory that are taking more space in the directory.  cd : change directory Is-l listing the items in long listing format  pwd : print working directory Is-I format: type :no of links:owner : group:size :month :day :time :name cd/: go to/directory whoami: tells us by which username we are logged in. touch jerry: creates the file named jerry in present working directory. cp jerry lex: copy the content of jerry file and paste it to lex file. vi text1: creates the file text1 and open it in vi editor mkdir superman: creates the directory called superman mkdir abc def  : creates 2 folder in one command. touch filename wont work in /etc/ folder if logged in by normal account. man cp: shows manual for cp command. echo "india is my country"> file1 puts the text in file1. rm filename: remove the filename  mv lex luther renames the file from lex to luther  mv luther /h

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 expected do