Ftp
-
Upload
satnam-kalsi -
Category
Documents
-
view
18 -
download
3
Transcript of Ftp
![Page 1: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/1.jpg)
1
![Page 2: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/2.jpg)
2
What is FTP?
File Transfer Protocol is one of the oldest
members of the TCP/IP protocol stack, yet it is
still in common use today. As the name suggests, it is
optimized for transferring files.
![Page 3: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/3.jpg)
3
FTP Server for Linux/Unix
vsFTPd - Very Secure FTP Daemon
WU-FTP - Washington University s (St. Louis)
Proftpd
![Page 4: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/4.jpg)
4
How FTP works ?
WindowsClient
WindowsClient
FTPServerFTP
Server
LinuxClientLinuxClient
/var/ftp/pub/var/ftp/pub
A
User1
B
User2User1
BA
User2
192.168.0.253192.168.0.253
![Page 5: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/5.jpg)
5
Requirements
Packages
vsftpd-2.0.1-5.i386.rpm
Port Numbers
20 Ftp Data Transfer
21 Ftp Control Connection
Configuration File
/etc/vsftpd/vsftpd.conf
Service
vsftpd
Daemon
vsftpd
![Page 6: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/6.jpg)
6
FTP Server Configuration - Anonymous Access
WindowsClient
WindowsClient
FTPServerFTP
Server
LinuxClientLinuxClient
/var/ftp/pub/var/ftp/pub192.168.0.253192.168.0.253
![Page 7: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/7.jpg)
7
Configuring FTP Server
Install the package by using one of the installation methods
[root@comp1 ~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
[root@comp1 ~]# cd /mnt
[root@comp1 ~]# rpm -ivh vsftpd-2.0.1-5.i386.rpm --force --aid
Install the package by using one of the installation methods
[root@comp1 ~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
[root@comp1 ~]# cd /mnt
[root@comp1 ~]# rpm -ivh vsftpd-2.0.1-5.i386.rpm --force --aid
Open configuration for editing
[root@comp1~]# vi /etc/vsftpd/vsftpd.conf
Open configuration for editing
[root@comp1~]# vi /etc/vsftpd/vsftpd.conf
![Page 8: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/8.jpg)
8
/etc/vsftpd/vsftpd.conf
Change the below options
anonymous_enable=YES
local_enable=NO
anon_upload_enable=YES
dirmessage_enable=YES
ftpd_banner=Welcome to ZOOM FTP service.
Change the below options
anonymous_enable=YES
local_enable=NO
anon_upload_enable=YES
dirmessage_enable=YES
ftpd_banner=Welcome to ZOOM FTP service.
![Page 9: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/9.jpg)
9
Configuring FTP Server
Creating upload directory
[root@comp1 ~]# mkdir /var/ftp/upload
Creating upload directory
[root@comp1 ~]# mkdir /var/ftp/upload
Giving Upload permissions
[root@comp1 ~]# chmod 777 /var/ftp/upload
Giving Upload permissions
[root@comp1 ~]# chmod 777 /var/ftp/upload
To restart the FTP services
[root@comp1 ~]# service vsftpd restart
To restart the FTP services
[root@comp1 ~]# service vsftpd restart
![Page 10: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/10.jpg)
10
FTP Client Linux
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing.drwxr-xr-x 2 0 0 4096 Mar 01 06:42 pubdrwxr-xrwx 2 0 0 4096 Mar 01 07:05 upload226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing.drwxr-xr-x 2 0 0 4096 Mar 01 06:42 pubdrwxr-xrwx 2 0 0 4096 Mar 01 07:05 upload226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
ftp 192.168.0.253
ftp
ls
bye
.
![Page 11: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/11.jpg)
11
FTP Client Linux
Accessing FTP via Graphical User Interface
[root@comp1 ~]# gftp 192.168.0.253
Accessing FTP via Graphical User Interface
[root@comp1 ~]# gftp 192.168.0.253
Accessing FTP via Graphical User Interface
Open Mozilla or Fire Fox browser.
In the address box type ftp://192.168.0.253
Accessing FTP via Graphical User Interface
Open Mozilla or Fire Fox browser.
In the address box type ftp://192.168.0.253
![Page 12: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/12.jpg)
12
FTP Client Windows
Accessing FTP via Command Line InterfaceC:\Documents and Settings\Administrator >Connected to 192.168.0.253.220 (vsFTPd 2.0.1)User (192.168.0.15:(none)):331 Please specify the password.Password:230 Login successful.ftp>200 PORT command successful. Consider using PASV.150 Here comes the directory listing.pubupload226 Directory send OK.ftp: 50 bytes received in 0.02Seconds 3.13Kbytes/sec.ftp>C:\Documents and Settings\Administrator >
Accessing FTP via Command Line InterfaceC:\Documents and Settings\Administrator >Connected to 192.168.0.253.220 (vsFTPd 2.0.1)User (192.168.0.15:(none)):331 Please specify the password.Password:230 Login successful.ftp>200 PORT command successful. Consider using PASV.150 Here comes the directory listing.pubupload226 Directory send OK.ftp: 50 bytes received in 0.02Seconds 3.13Kbytes/sec.ftp>C:\Documents and Settings\Administrator >
ftp 192.168.0.253
ftp
ls
bye
.
![Page 13: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/13.jpg)
13
FTP Client Windows
Accessing FTP via Graphical User Interface
Open Internet Explorer or Netscape Navigator browser.
In the address box type ftp://192.168.0.253
Accessing FTP via Graphical User Interface
Open Internet Explorer or Netscape Navigator browser.
In the address box type ftp://192.168.0.253
![Page 14: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/14.jpg)
14
FTP Server Configuration Local User Access
WindowsClient
WindowsClient
FTPServerFTP
Server
LinuxClientLinuxClient
/var/ftp/pub/var/ftp/pub192.168.0.253192.168.0.253
![Page 15: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/15.jpg)
15
/etc/vsftpd/vsftpd.conf
Change the below options
anonymous_enable=NO
local_enable=YES
Change the below options
anonymous_enable=NO
local_enable=YES
![Page 16: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/16.jpg)
16
Configuring FTP Server
Creating users
[root@comp1 ~]# useradd user1
[root@comp1 ~]# useradd user2
Creating users
[root@comp1 ~]# useradd user1
[root@comp1 ~]# useradd user2
Assigning password to the users
[root@comp1 ~]# passwd user1
[root@comp1 ~]# passwd user2
Assigning password to the users
[root@comp1 ~]# passwd user1
[root@comp1 ~]# passwd user2
![Page 17: Ftp](https://reader030.fdocuments.net/reader030/viewer/2022020217/5455d9d9b1af9f6a768b4bbc/html5/thumbnails/17.jpg)
17
FTP Client Linux
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing./home/user1226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing./home/user1226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
ftp 192.168.0.253
user1
pwd
bye
****