Lecture 8: FTP into CS System Topics: FTP connect, browse, upload, download Date: Mar 8, 2016.

Slides:



Advertisements
Similar presentations
Transfer Content to a Website What is FTP? File Transfer Protocol FTP is a protocol – a set of rules Designed to allow files to be transferred across.
Advertisements

Client-server practices DSC340 Mike Pangburn. Agenda Overview of client-server development Editing on client (e.g., Notepad) or directly on server (e.g.,
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
FILE TRANSFER PROTOCOL Short for File Transfer Protocol, the protocol for exchanging files over the Internet. FTP works in the same way as HTTP for transferring.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
George Blank University Lecturer. Creating A Web Site at NJIT Professor Blank.
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 20 File Transfer Protocol (FTP)
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
John Degenhart Joseph Allen.  What is FTP?  Communication over Control connection  Communication over Data Connection  File Type  Data Structure.
Telnet/SSH: Connecting to Hosts Internet Technology1.
Chapter 31 File Transfer & Remote File Access (NFS)
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
2440: 141 Web Site Administration Remote Web Server Access Tools Instructor: Enoch E. Damson.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
Accessing the Internet with Anonymous FTP Transferring Files from Remote Computers.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
1 Web Server Administration Chapter 9 Extending the Web Environment.
CNIT 132 Intermediate HTML and CSS Publish Web Page.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
1 Web Server Administration Chapter 9 Extending the Web Environment.
Secure Shell for Computer Science Nick Czebiniak Sung-Ho Maeung.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
1 INFO 321 Server Technologies II FTP Material adapted from Dr. Randy Kaplan.
Department of Computer Science Southern Illinois University Edwardsville Spring, 2008 Dr. Hiroshi Fujinoki FTP Protocol Programming.
Network Security: Lab#3 Transport-Level Security Tools J. H. Wang May 12, 2011.
Directory and File transfer Services By Jothi. Two key resources Lightweight Directory Access Protocol (LDAP) File Transfer protocol Secure file transfer.
Internet Business Foundations © 2004 ProsoftTraining All rights reserved.
Networking in Linux. ♦ Introduction A computer network is defined as a number of systems that are connected to each other and exchange information across.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
FTP File Transfer Protocol Graeme Strachan. Agenda  An Overview  A Demonstration  An Activity.
Configuring a LAN FTP Client Chapter 17 & 19. Setting up the physical layer Chapter 17 covers the basics of hubs, switches, routers and WAPs.
Produced;: Tartu Kutsehariduskeskus FTP – File Transfer Protocol Maarja Kask ACTION PROGRAMME OF THE EUROPEAN UNION LEONARDO DA VINCI PROJEKT NO.: 2002.
Linux Services Configuration
File Transfer Protocol (FTP) FTP host stores files Client logs into host Client program sends command to get a file FTP host downloads the file with error.
CITA 310 Section 8 Extending the Web Environment (Textbook Chapter 9)
Understanding FTP BUPT/QMUL Part1: Using telnet to learn FTP operations in passive mode Steps: 1. Using telnet to connect to given FTP server.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
VIRTUAL HOSTING WITH PureFTPd And MYSQL (Quota And Bandwidth Management) BY Odoh Kenneth Emeka Sun Yu Patrick Appiah.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
Protocols Monil Adhikari. Agenda Introduction Port Numbers Non Secure Protocols FTP HTTP Telnet POP3, SMTP Secure Protocols HTTPS.
1 Tips for the assignment. 2 Socket: a door between application process and end- end-transport protocol (UDP or TCP) TCP service: reliable transfer of.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
File Transfer Protocol (FTP) CIS 130. File Transfer Protocol (FTP) Copy files from one internet host (server) to your account on another host –Need domain.
1 FTP: File Transfer Protocol EE 122: Intro to Communication Networks Fall 2006 Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
+ Vieques and Your Computer Dan Malmer & Joey Azofeifa.
SSH. 2 SSH – Secure Shell SSH is a cryptographic protocol – Implemented in software originally for remote login applications – One most popular software.
Week-2 (Lecture-1) An electronic message sent from one computer to another. contains account i.e. How does.
Network Programming. These days almost all devices.
COSC 432 Shi Li 12/8/2008. File Transfer Protocol (FTP) Used to transfer files and data between computers via internet Defined as RFC959 Developed in.
FTP Lecture supp.
Module 23 (ftp and wireshark)
FTP - File Transfer Protocol
Web Server Administration
Aplikasi Jaringan.
CompTIA Server+ Certification (Exam SK0-004)
FTP and UNIX TOPICS Exploring your Web Hosting Site FTP UNIX
File Transfer Protocol
File Transfer: FTP Objectives Chapter 19
Web Programming Essentials:
Configuring Internet-related services
Chapter 2: Application layer
File Transfer Protocol
Downloading workshop files to your computer
Chapter 2 Application Layer
DIBBs Brown Dog Tutorial Setup
Presentation transcript:

Lecture 8: FTP into CS System Topics: FTP connect, browse, upload, download Date: Mar 8, 2016

Things to Learn (slide only) FTP Overview Using Anonymous FTP on UNC CS Systems Android FTP Client API

FTP Overview FTP stands for – File Transfer Protocol Better than HTTP for uploading/downloading multiple large-sized files It is a TCP based service Separate ports for command (21) and data (20) Data ports may be changed (in passive FTP) Directory level control access (username/pass) Less popular, less used, may die soon

FTP Passive Mode FTP PASV PORT 2024

SSH into UNC CS The File System: To you: /afs/cs.unc.edu/home/ftp To your anonymous friend: / incomingoutgoing you Your Anonymous Friend Will Access This As – ftp.cs.unc.edu Username = anonymous Password = any address Upload Download

SSH into UNC CS SSH Secure Shell Client classroom.cs.unc.edu CS user/password Useful Commands pwd ls cd mkdir cat touch

Uploading Files Uploading files from the phone to a server: Using IP/TCP or IP/UDP Sockets Using HTTP, HTTPS (GET, POST) Using FTP, SFTP / incoming you ftp.cs.unc.edu Username = anonymous Password = any address Upload

Android FTP API Android does not have any! Use 3 rd party Java API: Apache Commons Net Download: commons-net-3.4.jar Add the jar to your Android studio project:

Using FTP API to Upload a File Before uploading the file, first copy a file into your phone’s SD card (use ADB or some App) > adb push path/of/computer/file /sdcard/ C:\Users\You\AppData\Local\Android\Sdk\platform-tools The ADB tool can be found at, e.g. Execute this on your computer’s command prompt:

Using FTP API to Upload a File Write codes to connect and do stuffs with files (e.g. change directory, browse files, upload) FTPClient ftpClient = new FTPClient(); ftpClient.connect(InetAddress.getByName("ftp.cs.unc.edu")); ftpClient.login("anonymous", ftpClient.changeWorkingDirectory("incoming/nirjon"); FTPFile[] files = ftpClient.listFiles(); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); BufferedInputStream buffIn = null; File ff = new File("/sdcard/m.txt"); buffIn = new BufferedInputStream(new FileInputStream(ff)); ftpClient.enterLocalPassiveMode(); ftpClient.storeFile("upload1.txt", buffIn); buffIn.close(); ftpClient.logout(); ftpClient.disconnect(); Tips – use permissions, use AsyncTask

Using FTP API to Upload a File Write codes to connect and do stuffs with files (e.g. change directory, browse files, upload) FTPClient ftpClient = new FTPClient(); ftpClient.connect(InetAddress.getByName("ftp.cs.unc.edu")); ftpClient.login("anonymous", ftpClient.changeWorkingDirectory("incoming/nirjon"); FTPFile[] files = ftpClient.listFiles(); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); BufferedInputStream buffIn = null; File ff = new File("/sdcard/m.txt"); buffIn = new BufferedInputStream(new FileInputStream(ff)); ftpClient.enterLocalPassiveMode(); ftpClient.storeFile("upload1.txt", buffIn); buffIn.close(); ftpClient.logout(); ftpClient.disconnect(); Tips – use permissions, use AsyncTask

Using FTP API to Upload a File Write codes to connect and do stuffs with files (e.g. change directory, browse files, upload) FTPClient ftpClient = new FTPClient(); ftpClient.connect(InetAddress.getByName("ftp.cs.unc.edu")); ftpClient.login("anonymous", ftpClient.changeWorkingDirectory("incoming/nirjon"); FTPFile[] files = ftpClient.listFiles(); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); BufferedInputStream buffIn = null; File ff = new File("/sdcard/m.txt"); buffIn = new BufferedInputStream(new FileInputStream(ff)); ftpClient.enterLocalPassiveMode(); ftpClient.storeFile("upload1.txt", buffIn); buffIn.close(); ftpClient.logout(); ftpClient.disconnect(); Tips – use permissions, use AsyncTask