← QCE Digital Solutions Unit 4

FTP

File Transfer Protocol: moves files between a client and a server (upload/download) on port 21. It sends data and logins as plain text, so use SFTP or FTPS for security.

Understanding FTP in QCE Digital Solutions Unit 4

What it does: A get command asks the server to send a file down to the client computer, which is downloading. SFTP encrypts the login and the files being moved, so an interceptor cannot read them. FTPS does the same using SSL/TLS. FTP uses port 21 by default. Port 443 is used by HTTPS. Standard FTP sends data and logins as plain text. Someone in a man-in-the-middle attack could read them. The server holds the files and responds to requests. The client connects to the server to upload or download. SFTP and FTPS are secure versions of FTP that protect the data and logins in transit.

Common mistakes: Python's ftplib module provides the FTP class (and FTP_TLS for the secure version). There is no SFTP class in ftplib, so the import should be 'from ftplib import FTP'. The ftplib method for changing the working folder on the server is cwd(), not cd(). The line should be ftp.cwd("/reports").

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 89–125) and word search (Modules 17–125).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does FTP stand for and do?
Fast Transmission Process: encrypts files as they travel across a networkFile Transfer Protocol: moves files between a client and a server
Matches
Use plain FTP on a public Wi-Fi network to send a login and password, because FTP encrypts everything.
↓
Plain FTP does not encrypt anything. Logins and files travel as plain text, so an interceptor could read them.
Applying
Meanings
Term
FTP
Meaning
File Transfer Protocol: moves files between a client and a server (upload/download) on port 21. It sends data and logins as plain text, so use SFTP or FTPS for security.
Practice
open ftp.school.edu 21
Testing
Gaps
://files.school.edu.au/notes.txt
Check Answer
Spots
1from ftplib import SFTP
2ftp = FTP()

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Sperm Whale' badge — Deep Sea Champion, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does FTP stand for and do?
A. Fast Transmission Process: encrypts files as they travel across a network
B. File Transfer Protocol: moves files between a client and a server ✓
FTP is the File Transfer Protocol. It moves files between a client and a server. It does not encrypt them.
2. A student copies a website's files from their laptop to a web server. Which FTP action is this?
A. Downloading
B. Uploading ✓
Sending a file from the client (the laptop) to the server is an upload. Downloading is the reverse, from server to client.
3. Which port does FTP use for its control connection by default?
A. Port 21 ✓
B. Port 443
FTP uses port 21 by default. Port 443 is used by HTTPS.
4. Standard FTP is used to log in with a username and password. How are those logins sent?
A. As plain text that an interceptor could read ✓
B. Encrypted so an interceptor sees only ciphertext
Standard FTP sends data and logins as plain text. Someone in a man-in-the-middle attack could read them.
5. Which choice is the better way to transfer a file containing students' personal data?
A. SFTP, because it encrypts the transfer ✓
B. Plain FTP, because port 21 is secure
SFTP and FTPS add encryption. Plain FTP does not, so port 21 does not make it secure.

Match the Pairs

PUT report.docx → Uploads a file from the client to the FTP server
ftp.school.edu.au:21 → Connects to an FTP server on its standard control port
Downloading copies a file from the FTP server to the client → GET photos.zip
A secure version of FTP that runs over SSH so data and logins are encrypted → sftp student@server.com
Use plain FTP on a public Wi-Fi network to send a login and password, because FTP encrypts everything. → Plain FTP does not encrypt anything. Logins and files travel as plain text, so an interceptor could read them.
FTP is used to display web pages in a browser on port 21. → FTP moves files between a client and a server. Web pages are sent by HTTP or HTTPS, not FTP.

Key Term

FTP
File Transfer Protocol: moves files between a client and a server (upload/download) on port 21. It sends data and logins as plain text, so use SFTP or FTPS for security.

Fill in the Blanks

1. ftp://files.school.edu.au/notes.txt
Hint: Type the lowercase URL scheme that tells the browser to use File Transfer Protocol.
2. ftp.connect("files.example.com", 21)
Hint: Type the standard port number that FTP uses for its control connection.
3. ftp.login("student", "pass123")
Hint: Type the method name that sends the username and password to the server, which FTP sends as plain text.
4. ftp = FTP_TLS("files.example.com")
Hint: Type the class name for the secured version of FTP that adds TLS encryption (known as FTPS).
5. sftp student@files.example.com put report.pdf
Hint: Type the short SFTP command that uploads a local file to the server.

Spot the Error

Question 1
A from ftplib import SFTP
B ftp = FTP()
C ftp.connect("files.net", 21)
D ftp.login("sam", "pw123")
Line A — Python's ftplib module provides the FTP class (and FTP_TLS for the secure version). There is no SFTP class in ftplib, so the import should be 'from ftplib import FTP'.
Question 2
A from ftplib import FTP
B ftp = FTP("files.net")
C ftp.login("sam", "pw123")
D ftp.cd("/reports")
E ftp.quit()
Line D — The ftplib method for changing the working folder on the server is cwd(), not cd(). The line should be ftp.cwd("/reports").
Question 3
A ftp.login("sam", "pw123")
B f = open("a.txt", "wb")
C cmd = "STOR a.txt"
D ftp.storbinary(cmd, f)
Line B — Uploading means reading the local file and sending it to the server, so it must be opened in read-binary mode ("rb"). Mode "wb" would overwrite the file with nothing to send.
Question 4
A ftp.login("sam", "pw123")
B f = open("a.txt", "wb")
C cmd = "STOR a.txt"
D ftp.retrbinary(cmd, f.write)
Line C — Downloading uses the RETR (retrieve) command with retrbinary(). STOR is the upload command, so the line should be cmd = "RETR a.txt".
Question 5
A HOST = "files.school.edu"
B PORT = 22
C ftp = FTP()
D ftp.connect(HOST, PORT)
Line B — FTP's control connection uses port 21. Port 22 is used by SFTP (which runs over SSH), so the line should be PORT = 21.

Student with a class code? Join your class →