FTP - File Transfer Protocol
What is FTP?
FTP stands for File Transfer Protocol. It’s a standard network protocol used to transfer files between a client and a server over a TCP/IP network, such as the internet or a local network.
What is the purpose of FTP?
Uploading and downloading files between systems.
Managing website files on a remote server.
Backing up data to a remote location.
Sharing large files that are too big for email.
It provides a simple way to move files across systems, especially in web development and system administration.
How does it work?
Client connects to FTP server – Using an FTP client (like FileZilla), the user connects to the server using a username and password.
Authentication – The server verifies the credentials.
File operations – The user can upload, download, rename, delete, or move files on the server.
Connection closes – Once done, the client disconnects from the server.
FTP uses two channels: 1. Command channel – For sending commands and responses 2. Data channel – For transferring actual files
Where is FTP used?
Web hosting – To upload website files to a server.
Corporate environments – For internal file sharing and backups.
Software distribution – To provide downloadable files (e.g., drivers, updates).
Remote administration – For managing files on remote systems.
Which OSI Layer does this protocol belong to?
FTP operates at the Application Layer (Layer 7) of the OSI model.
It provides file transfer services to applications and users.
It relies on TCP (Layer 4) for reliable communication.
Topics in this section,
In this section, you are going to learn
Terminology
Version Info
FTP Version |
FTP Version |
Year |
Core Idea / Contribution |
---|---|---|---|
FTP v1 |
|||
RFC 114 |
1971 |
First definition of FTP; basic file transfer over ARPANET. |
|
RFC 141 |
1971 |
First definition of FTP; basic file transfer over ARPANET. |
|
RFC 172 |
1971 |
Additional clarifications. |
|
FTP v2 |
|||
RFC 265 |
1972 |
Revised protocol with structured commands and replies. |
|
FTP v3 |
|||
RFC 354 |
1972 |
Improved reliability and functionality. |
|
FTP v4 |
|||
RFC 454 |
1973 |
More complete FTP model with refined control and data channels. |
|
FTP v5 |
|||
RFC 542 |
1973 |
Pre-standard stable draft with enhanced command sets. |
|
FTP [Standard] |
|||
RFC 765 |
1980 |
First formal FTP standard; complete protocol specification. |
|
FTP v6 [Modern] |
|||
RFC 959 |
1985 |
Finalized and modern FTP; passive mode, structured replies, etc. |
|
RFC 1123 |
1989 |
Defined FTP compliance for Internet hosts. |
|
RFC 1579 |
1994 |
Enabled FTP to work through firewalls and NATs. |
|
RFC 2228 |
1997 |
Introduced AUTH, MIC, CONF, ENC for secure authentication. |
|
RFC 2389 |
1998 |
FEAT and OPTS commands for capability discovery. |
|
RFC 2428 |
1998 |
EPRT and EPSV for IPv6 and better NAT handling. |
|
RFC 4217 |
2005 |
Secured FTP communication using TLS. |
|
RFC 5797 |
2010 |
Standardized method for tracking FTP extensions via IANA. |
Setup
Setup
FTP USER Command
S.No |
Protocol Packets |
Description |
Size(bytes) |
---|---|---|---|
1 |
FTP USER Command |
Used to initiate login by sending the username to the FTP server. |
57 |
Command |
USER |
4 |
|
Arguments |
Username |
20 |
|
Response Code |
331 (Username OK, need password) |
3 |
|
Response Message |
“User name okay, need password.” |
30 |
|
Data (Payload) |
Text-based command sent over TCP port 21 |
0 |
|
FTP PASS Command
2 |
FTP PASS Command |
Sends the password for authentication after the USER command. |
51 |
---|---|---|---|
Command |
PASS |
4 |
|
Arguments |
Password |
20 |
|
Response Code |
230 (User logged in) or 530 (Login incorrect) |
3 |
|
Response Message |
“User logged in, proceed.” |
24 |
|
Data (Payload) |
Text-based command sent over TCP port 21 |
0 |
|
FTP LIST Command
3 |
FTP LIST Command |
Requests a directory listing from the server. |
60 |
---|---|---|---|
Command |
LIST |
4 |
|
Arguments |
Optional directory path |
20 |
|
Response Code |
150 (Opening data connection), 226 (Transfer complete) |
3 |
|
Response Message |
“Here comes the directory listing.” |
33 |
|
Data (Payload) |
Sent over control channel; actual listing sent over data channel |
0 |
|
FTP RETR Command
4 |
FTP RETR Command |
Requests to download a file from the server. |
63 |
---|---|---|---|
Command |
RETR |
4 |
|
Arguments |
Filename |
20 |
|
Response Code |
150, 226 |
3 |
|
Response Message |
“Opening BINARY mode data connection.” |
36 |
|
Data (Payload) |
File data sent over a separate TCP data connection (port 20) |
0 |
FTP STOR Command
5 |
FTP STOR Command |
Requests to upload a file to the server. |
63 |
---|---|---|---|
Command |
STOR |
4 |
|
Arguments |
Filename |
20 |
|
Response Code |
150, 226 |
3 |
|
Response Message |
“Opening BINARY mode data connection.” |
36 |
|
Data (Payload) |
File data sent over a separate TCP data connection (port 20) |
0 |
|
FTP QUIT Command
6 |
FTP QUIT Command |
Terminates the FTP session. |
15 |
---|---|---|---|
Command |
QUIT |
4 |
|
Arguments |
None |
0 |
|
Response Code |
221 |
3 |
|
Response Message |
“Goodbye.” |
8 |
|
Data (Payload) |
Sent over control channel |
0 |
|
FTP Data Packet
7 |
FTP Data Packet |
Carries actual file or directory listing data. |
1013 |
---|---|---|---|
Source Port |
Usually port 20 (server) |
2 |
|
Destination Port |
Random high port (client) |
2 |
|
Sequence Number |
Managed by TCP |
4 |
|
Acknowledgment Number |
Managed by TCP |
4 |
|
Flags |
PSH, ACK |
1 |
|
Data (Payload) |
File content or directory listing |
1000 |
|
S.no |
Use Case |
Description |
---|---|---|
1 |
Website Deployment |
Upload website files to a remote server. |
2 |
Software Distribution |
Provide downloadable files via FTP server example - Drives. |
3 |
Data Backup |
Automatically back up files to an off-site server. |
4 |
File Sharing Across Network |
Share large files not suitable for email. |
5 |
IoT and Embedded Devices |
Transfer logs or firmware updates. |
S.no |
Feature |
Description |
---|---|---|
1 |
File Transfer |
|
|
||
2 |
Authentication |
|
|
||
3 |
Directory Operations |
|
|
||
|
||
|
||
4 |
File Management |
|
|
||
|
||
|
||
5 |
Modes of Transfer |
|
|
||
|
||
6 |
Transfer Types |
|
|
||
|
||
7 |
Multiple Platforms |
|
|
||
|
||
8 |
Control & Data Channels |
|
|
||
|
||
9 |
Logging & Auditing |
|
File Transfer - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Connect to FTP Server |
Attempt to connect to a valid FTP server |
Connection successful |
2 |
Invalid Server Address |
Connect using an incorrect server address |
Connection fails with error |
3 |
Anonymous Login |
Login using anonymous credentials |
Login successful |
4 |
Invalid Credentials |
Login with wrong username/password |
Login fails |
5 |
Upload Small File |
Upload a small text file |
File uploaded successfully |
6 |
Upload Large File |
Upload a large file (e.g., 1GB) |
File uploaded successfully |
7 |
Download Existing File |
Download a file that exists on the server |
File downloaded successfully |
8 |
Download Non-existent File |
Attempt to download a file that doesn’t exist |
Error message shown |
9 |
Resume Interrupted Upload |
Resume an upload after interruption |
Upload resumes from last point |
10 |
Resume Interrupted Download |
Resume a download after interruption |
Download resumes from last point |
11 |
Passive Mode Transfer |
Transfer file using passive mode |
File transferred successfully |
12 |
Active Mode Transfer |
Transfer file using active mode |
File transferred successfully |
13 |
Upload Binary File |
Upload a binary file (e.g., .exe) |
File uploaded without corruption |
14 |
Upload ASCII File |
Upload a text file in ASCII mode |
File uploaded correctly |
15 |
File Overwrite Prompt |
Upload a file with same name |
Prompt to overwrite or rename |
16 |
File Rename on Upload |
Rename file during upload |
File uploaded with new name |
17 |
File Rename on Download |
Rename file during download |
File saved with new name |
18 |
Upload with Special Characters |
Upload file with special characters in name |
File uploaded successfully |
19 |
Upload with Long Filename |
Upload file with long name (>255 chars) |
Error or successful upload |
20 |
Transfer Timeout |
Simulate network timeout during transfer |
Transfer fails with timeout error |
21 |
Transfer Retry |
Retry file transfer after failure |
Transfer resumes or restarts |
22 |
Upload to Non-existent Directory |
Upload to a directory that doesnt exist |
Error or directory created |
23 |
Download from Non-existent Directory |
Download from invalid directory |
Error message shown |
24 |
File Permission Denied |
Upload to a restricted directory |
Permission denied error |
25 |
Concurrent Uploads |
Upload multiple files simultaneously |
All files uploaded successfully |
26 |
Concurrent Downloads |
Download multiple files simultaneously |
All files downloaded successfully |
27 |
File Integrity Check |
Verify checksum after transfer |
Checksums match |
28 |
Upload Hidden File |
Upload a hidden file (e.g., .env) |
File uploaded successfully |
29 |
Download Hidden File |
Download a hidden file |
File downloaded successfully |
30 |
Upload Folder |
Upload a folder with multiple files |
All files uploaded |
31 |
Download Folder |
Download a folder |
Folder and contents downloaded |
32 |
Cancel Upload |
Cancel an ongoing upload |
Upload stops immediately |
33 |
Cancel Download |
Cancel an ongoing download |
Download stops immediately |
34 |
Upload with Limited Bandwidth |
Upload under bandwidth limit |
Upload completes slowly |
35 |
Download with Limited Bandwidth |
Download under bandwidth limit |
Download completes slowly |
36 |
Upload with Encryption (FTPS) |
Upload using FTPS |
File uploaded securely |
37 |
Download with Encryption (FTPS) |
Download using FTPS |
File downloaded securely |
38 |
Upload with SFTP |
Upload using SFTP protocol |
File uploaded successfully |
39 |
Download with SFTP |
Download using SFTP protocol |
File downloaded successfully |
40 |
Upload with Firewall Enabled |
Upload with firewall restrictions |
Transfer may fail or succeed |
41 |
Download with Firewall Enabled |
Download with firewall restrictions |
Transfer may fail or succeed |
42 |
Upload with Proxy |
Upload using FTP proxy |
File uploaded successfully |
43 |
Download with Proxy |
Download using FTP proxy |
File downloaded successfully |
44 |
Upload with Logging Enabled |
Enable logging during upload |
Logs show transfer details |
45 |
Download with Logging Enabled |
Enable logging during download |
Logs show transfer details |
46 |
Upload with File Lock |
Upload a file that is locked |
Upload fails with error |
47 |
Download with File Lock |
Download a locked file |
Download fails or succeeds |
48 |
Upload Duplicate Files |
Upload same file multiple times |
Files renamed or overwritten |
49 |
Upload with Interrupted Network |
Disconnect network mid-upload |
Upload fails with error |
50 |
Download with Interrupted Network |
Disconnect network mid-download |
Download fails with error |
Authentication - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Valid Login |
Login with correct username and password |
Login successful |
2 |
Invalid Username |
Login with incorrect username |
Authentication fails |
3 |
Invalid Password |
Login with incorrect password |
Authentication fails |
4 |
Empty Username |
Attempt login with empty username |
Authentication fails |
5 |
Empty Password |
Attempt login with empty password |
Authentication fails |
6 |
Both Fields Empty |
Attempt login with empty username and password |
Authentication fails |
7 |
Case Sensitivity |
Login with correct credentials but wrong case |
Authentication fails |
8 |
Special Characters in Username |
Use special characters in username |
Authentication fails or succeeds based on server rules |
9 |
Special Characters in Password |
Use special characters in password |
Authentication succeeds if password is correct |
10 |
Long Username |
Use a very long username |
Authentication fails or succeeds based on server limits |
11 |
Long Password |
Use a very long password |
Authentication fails or succeeds based on server limits |
12 |
SQL Injection Attempt |
Try SQL injection in login fields |
Authentication fails, input sanitized |
13 |
Anonymous Login Allowed |
Login using anonymous credentials |
Login successful |
14 |
Anonymous Login Disallowed |
Attempt anonymous login when disabled |
Authentication fails |
15 |
Login with Expired Account |
Use expired user credentials |
Authentication fails |
16 |
Login with Locked Account |
Use credentials of a locked account |
Authentication fails |
17 |
Login with Disabled Account |
Use credentials of a disabled account |
Authentication fails |
18 |
Login with Inactive Account |
Use credentials of an inactive account |
Authentication fails |
19 |
Login with Multiple Sessions |
Login from multiple clients simultaneously |
All sessions authenticated if allowed |
20 |
Login with IP Restriction |
Login from unauthorized IP |
Authentication fails |
21 |
Login with Time Restriction |
Login outside allowed time window |
Authentication fails |
22 |
Login with Role Restriction |
Login with user not allowed FTP access |
Authentication fails |
23 |
Login with Correct Credentials After Failure |
Retry login after failed attempt |
Login successful |
24 |
Login After Multiple Failures |
Login after several failed attempts |
Account may be locked or login succeeds |
25 |
Login with Encrypted Password |
Use encrypted password (e.g., FTPS) |
Authentication successful |
26 |
Login with Plaintext Password |
Use plaintext password (FTP) |
Authentication successful |
27 |
Login with SFTP |
Authenticate using SFTP protocol |
Authentication successful |
28 |
Login with FTPS |
Authenticate using FTPS protocol |
Authentication successful |
29 |
Login with Invalid Port |
Attempt login on wrong port |
Connection fails |
30 |
Login with Correct Port |
Attempt login on correct port |
Authentication successful |
31 |
Login with Proxy |
Authenticate via FTP proxy |
Authentication successful |
32 |
Login with VPN |
Authenticate via VPN connection |
Authentication successful |
33 |
Login with Firewall Enabled |
Authenticate with firewall restrictions |
Authentication may fail or succeed |
34 |
Login with Brute Force Attempt |
Simulate brute force login |
Account locked or blocked |
35 |
Login with Captcha (if enabled) |
Attempt login with captcha |
Authentication succeeds if captcha passed |
36 |
Login with MFA Enabled |
Authenticate with multi-factor authentication |
Authentication successful |
37 |
Login with MFA Disabled |
Authenticate without MFA |
Authentication successful |
38 |
Login with Certificate |
Authenticate using client certificate |
Authentication successful |
39 |
Login with Invalid Certificate |
Use invalid certificate |
Authentication fails |
40 |
Login with Expired Certificate |
Use expired certificate |
Authentication fails |
41 |
Login with Revoked Certificate |
Use revoked certificate |
Authentication fails |
42 |
Login with Public Key |
Authenticate using SSH public key |
Authentication successful |
43 |
Login with Invalid Public Key |
Use wrong public key |
Authentication fails |
44 |
Login with Password Policy Violation |
Use password not meeting policy |
Authentication fails |
45 |
Login with Session Timeout |
Login after session timeout |
Re-authentication required |
46 |
Login with Session Persistence |
Maintain session after login |
Session remains active |
47 |
Login with Session Hijacking Attempt |
Simulate session hijack |
Session invalidated |
48 |
Login with Logging Enabled |
Enable logging during login |
Login attempts logged |
49 |
Login with Audit Trail |
Ensure audit trail is recorded |
Login recorded in audit logs |
50 |
Login with Server Restart |
Attempt login after server restart |
Authentication successful |
Directory Operations - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
List Root Directory |
List contents of root directory |
Directory contents displayed |
2 |
List Subdirectory |
List contents of a subdirectory |
Subdirectory contents displayed |
3 |
List Empty Directory |
List contents of an empty directory |
No files/folders shown |
4 |
Create New Directory |
Create a new directory |
Directory created successfully |
5 |
Create Nested Directory |
Create a directory inside another |
Nested directory created |
6 |
Create Directory with Special Characters |
Use special characters in directory name |
Directory created or error shown |
7 |
Create Directory with Long Name |
Use a name >255 characters |
Error or directory created |
8 |
Create Directory with Spaces |
Use spaces in directory name |
Directory created successfully |
9 |
Create Duplicate Directory |
Create a directory that already exists |
Error or overwrite prompt |
10 |
Delete Empty Directory |
Delete a directory with no contents |
Directory deleted successfully |
11 |
Delete Non-empty Directory |
Delete a directory with files |
Error or recursive delete |
12 |
Delete Non-existent Directory |
Attempt to delete a directory that doesn’t exist |
Error message shown |
13 |
Rename Directory |
Rename an existing directory |
Directory renamed successfully |
14 |
Rename to Existing Directory Name |
Rename to a name that already exists |
Error or overwrite prompt |
15 |
Change to Existing Directory |
Change working directory to a valid one |
Directory changed successfully |
16 |
Change to Non-existent Directory |
Change to a directory that doesnt exist |
Error message shown |
17 |
Change to Parent Directory |
Move up one level in directory tree |
Directory changed successfully |
18 |
Change to Root Directory |
Move to root directory |
Directory changed successfully |
19 |
Upload File to Directory |
Upload a file into a specific directory |
File uploaded successfully |
20 |
Download File from Directory |
Download a file from a specific directory |
File downloaded successfully |
21 |
Directory Permission Denied |
Try to access restricted directory |
Permission denied error |
22 |
Directory Listing with Passive Mode |
List directory in passive mode |
Directory listed successfully |
23 |
Directory Listing with Active Mode |
List directory in active mode |
Directory listed successfully |
24 |
Directory Listing with Timeout |
Simulate timeout during listing |
Timeout error shown |
25 |
Directory Listing with Firewall |
List directory with firewall enabled |
Listing may succeed or fail |
26 |
Directory Listing with Proxy |
List directory using proxy |
Directory listed successfully |
27 |
Directory Listing with VPN |
List directory over VPN |
Directory listed successfully |
28 |
Directory Listing with FTPS |
List directory over FTPS |
Directory listed securely |
29 |
Directory Listing with SFTP |
List directory over SFTP |
Directory listed securely |
30 |
Directory Listing with Logging Enabled |
Enable logging during listing |
Logs show directory access |
31 |
Directory Listing with Hidden Files |
List directory with hidden files |
Hidden files shown if allowed |
32 |
Directory Listing with Filters |
List files with specific extension |
Only matching files shown |
33 |
Directory Listing with Sorting |
List files sorted by name/date |
Files sorted as expected |
34 |
Directory Listing with Pagination |
List large directory with pagination |
Files shown in pages |
35 |
Directory Listing with Symbolic Links |
List directory with symlinks |
Symlinks displayed correctly |
36 |
Directory Listing with Unicode Names |
List directory with Unicode names |
Names displayed correctly |
37 |
Directory Listing with Corrupted Entry |
List directory with corrupted entry |
Error or partial listing |
38 |
Directory Listing with Large Number of Files |
List directory with 1000+ files |
All files listed |
39 |
Directory Listing with No Read Permission |
List directory without read access |
Permission denied |
40 |
Directory Listing After Server Restart |
List directory after FTP server restart |
Directory listed successfully |
41 |
Directory Listing After Session Timeout |
List directory after session timeout |
Re-authentication required |
42 |
Directory Listing with Invalid Path |
Use invalid path for listing |
Error message shown |
43 |
Directory Listing with Relative Path |
Use relative path for listing |
Directory listed successfully |
44 |
Directory Listing with Absolute Path |
Use absolute path for listing |
Directory listed successfully |
45 |
Directory Listing with Case Sensitivity |
Use wrong case in directory name |
Error or directory listed |
46 |
Directory Listing with Concurrent Users |
Multiple users list same directory |
All users see consistent results |
47 |
Directory Listing with File Lock |
List directory with locked files |
Files listed, lock status ignored |
48 |
Directory Listing with Symbolic Path |
Use symbolic path (e.g., . or ..) |
Correct directory listed |
49 |
Directory Listing with Invalid Characters |
Use invalid characters in path |
Error message shown |
50 |
Directory Listing with Server Load |
List directory under high server load |
Listing may be delayed |
File Management - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Upload File |
Upload a file to the server |
File uploaded successfully |
2 |
Download File |
Download a file from the server |
File downloaded successfully |
3 |
Delete File |
Delete a file from the server |
File deleted successfully |
4 |
Rename File |
Rename a file on the server |
File renamed successfully |
5 |
Move File |
Move a file to another directory |
File moved successfully |
6 |
Copy File |
Copy a file to another directory |
File copied successfully |
7 |
Overwrite File |
Upload a file with the same name |
File overwritten or prompt shown |
8 |
Upload File with Special Characters |
Upload file with special characters in name |
File uploaded successfully |
9 |
Upload File with Long Name |
Upload file with name >255 characters |
Error or file uploaded |
10 |
Upload File with No Extension |
Upload file without extension |
File uploaded successfully |
11 |
Upload Hidden File |
Upload a hidden file (e.g., .env) |
File uploaded successfully |
12 |
Download Hidden File |
Download a hidden file |
File downloaded successfully |
13 |
Delete Hidden File |
Delete a hidden file |
File deleted successfully |
14 |
Rename Hidden File |
Rename a hidden file |
File renamed successfully |
15 |
Upload Binary File |
Upload a binary file (e.g., .exe) |
File uploaded without corruption |
16 |
Upload Text File |
Upload a plain text file |
File uploaded successfully |
17 |
Upload Large File |
Upload a file >1GB |
File uploaded successfully |
18 |
Download Large File |
Download a file >1GB |
File downloaded successfully |
19 |
Delete Non-existent File |
Attempt to delete a file that doesnt exist |
Error message shown |
20 |
Rename Non-existent File |
Attempt to rename a file that doesnt exist |
Error message shown |
21 |
Move Non-existent File |
Attempt to move a file that doesnt exist |
Error message shown |
22 |
Copy Non-existent File |
Attempt to copy a file that doesnt exist |
Error message shown |
23 |
File Permission Denied |
Try to modify a file without permission |
Permission denied error |
24 |
File Lock Handling |
Try to delete a locked file |
Error or file deleted |
25 |
File Timestamp Update |
Check timestamp after file upload |
Timestamp updated correctly |
26 |
File Size Verification |
Verify file size after upload |
Size matches original |
27 |
File Integrity Check |
Verify checksum after upload/download |
Checksums match |
28 |
Upload with Timeout |
Simulate timeout during upload |
Upload fails with timeout error |
29 |
Download with Timeout |
Simulate timeout during download |
Download fails with timeout error |
30 |
Cancel Upload |
Cancel an ongoing upload |
Upload stops immediately |
31 |
Cancel Download |
Cancel an ongoing download |
Download stops immediately |
32 |
Resume Upload |
Resume interrupted upload |
Upload resumes from last point |
33 |
Resume Download |
Resume interrupted download |
Download resumes from last point |
34 |
Upload with Passive Mode |
Upload file using passive mode |
File uploaded successfully |
35 |
Upload with Active Mode |
Upload file using active mode |
File uploaded successfully |
36 |
File Listing |
List all files in a directory |
Files listed successfully |
37 |
File Listing with Filter |
List files with specific extension |
Filtered files listed |
38 |
File Listing with Sorting |
List files sorted by name/date |
Files sorted correctly |
39 |
File Listing with Pagination |
List large number of files |
Files shown in pages |
40 |
File Listing with Hidden Files |
Include hidden files in listing |
Hidden files shown |
41 |
File Listing with No Permission |
List files in restricted directory |
Permission denied |
42 |
File Listing with Corrupted Entry |
List directory with corrupted file |
Error or partial listing |
43 |
File Listing After Server Restart |
List files after FTP server restart |
Files listed successfully |
44 |
File Listing After Session Timeout |
List files after session timeout |
Re-authentication required |
45 |
File Listing with Invalid Path |
Use invalid path for listing |
Error message shown |
46 |
File Listing with Relative Path |
Use relative path for listing |
Files listed successfully |
47 |
File Listing with Absolute Path |
Use absolute path for listing |
Files listed successfully |
48 |
File Listing with Symbolic Links |
List directory with symlinks |
Symlinks displayed correctly |
49 |
File Listing with Unicode Names |
List files with Unicode names |
Names displayed correctly |
50 |
File Listing with Server Load |
List files under high server load |
Listing may be delayed |
Modes of Transfer - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Connect in Active Mode |
Establish FTP connection in active mode |
Connection successful |
2 |
Connect in Passive Mode |
Establish FTP connection in passive mode |
Connection successful |
3 |
Upload File in Active Mode |
Upload a file using active mode |
File uploaded successfully |
4 |
Upload File in Passive Mode |
Upload a file using passive mode |
File uploaded successfully |
5 |
Download File in Active Mode |
Download a file using active mode |
File downloaded successfully |
6 |
Download File in Passive Mode |
Download a file using passive mode |
File downloaded successfully |
7 |
Switch from Active to Passive Mode |
Change mode during session |
Mode switched successfully |
8 |
Switch from Passive to Active Mode |
Change mode during session |
Mode switched successfully |
9 |
Upload in ASCII Mode |
Upload a text file in ASCII mode |
File uploaded with correct formatting |
10 |
Upload in Binary Mode |
Upload a binary file in binary mode |
File uploaded without corruption |
11 |
Download in ASCII Mode |
Download a text file in ASCII mode |
File downloaded with correct formatting |
12 |
Download in Binary Mode |
Download a binary file in binary mode |
File downloaded without corruption |
13 |
Upload Binary File in ASCII Mode |
Upload binary file in ASCII mode |
File corrupted or error shown |
14 |
Upload Text File in Binary Mode |
Upload text file in binary mode |
File uploaded successfully |
15 |
Download Binary File in ASCII Mode |
Download binary file in ASCII mode |
File corrupted or error shown |
16 |
Download Text File in Binary Mode |
Download text file in binary mode |
File downloaded successfully |
17 |
Upload Large File in Passive Mode |
Upload large file using passive mode |
File uploaded successfully |
18 |
Upload Large File in Active Mode |
Upload large file using active mode |
File uploaded successfully |
19 |
Download Large File in Passive Mode |
Download large file using passive mode |
File downloaded successfully |
20 |
Download Large File in Active Mode |
Download large file using active mode |
File downloaded successfully |
21 |
Passive Mode Behind NAT |
Use passive mode behind NAT firewall |
Transfer successful |
22 |
Active Mode Behind NAT |
Use active mode behind NAT firewall |
Transfer fails or requires port forwarding |
23 |
ASCII Mode Line Ending Conversion |
Check line endings after ASCII transfer |
Line endings converted correctly |
24 |
Binary Mode Line Ending Preservation |
Check line endings after binary transfer |
Line endings preserved |
25 |
Passive Mode with Firewall Enabled |
Transfer file in passive mode with firewall |
Transfer successful |
26 |
Active Mode with Firewall Enabled |
Transfer file in active mode with firewall |
Transfer may fail |
27 |
ASCII Mode with Unicode File |
Transfer Unicode text file in ASCII mode |
File may be corrupted |
28 |
Binary Mode with Unicode File |
Transfer Unicode file in binary mode |
File transferred correctly |
29 |
ASCII Mode with Special Characters |
Transfer file with special characters |
Characters may be altered |
30 |
Binary Mode with Special Characters |
Transfer file with special characters |
Characters preserved |
31 |
ASCII Mode with Large Text File |
Transfer large text file in ASCII mode |
File transferred successfully |
32 |
Binary Mode with Executable File |
Transfer .exe file in binary mode |
File transferred without corruption |
33 |
ASCII Mode with HTML File |
Transfer HTML file in ASCII mode |
File transferred correctly |
34 |
Binary Mode with Image File |
Transfer image file in binary mode |
Image transferred without corruption |
35 |
ASCII Mode with CSV File |
Transfer CSV file in ASCII mode |
File transferred correctly |
36 |
Binary Mode with ZIP File |
Transfer ZIP file in binary mode |
File transferred without corruption |
37 |
Passive Mode with Multiple Files |
Transfer multiple files in passive mode |
All files transferred successfully |
38 |
Active Mode with Multiple Files |
Transfer multiple files in active mode |
All files transferred successfully |
39 |
ASCII Mode with File Rename |
Rename file during ASCII transfer |
File renamed and transferred |
40 |
Binary Mode with File Rename |
Rename file during binary transfer |
File renamed and transferred |
41 |
Passive Mode with Resume Support |
Resume interrupted transfer in passive mode |
Transfer resumes successfully |
42 |
Active Mode with Resume Support |
Resume interrupted transfer in active mode |
Transfer resumes successfully |
43 |
ASCII Mode with Resume Support |
Resume ASCII transfer |
Transfer resumes successfully |
44 |
Binary Mode with Resume Support |
Resume binary transfer |
Transfer resumes successfully |
45 |
Passive Mode with Proxy |
Use passive mode through proxy |
Transfer successful |
46 |
Active Mode with Proxy |
Use active mode through proxy |
Transfer may fail |
47 |
ASCII Mode with Logging Enabled |
Enable logging during ASCII transfer |
Logs show correct data |
48 |
Binary Mode with Logging Enabled |
Enable logging during binary transfer |
Logs show correct data |
49 |
Passive Mode with High Latency |
Transfer file in passive mode with delay |
Transfer completes slowly |
50 |
Active Mode with High Latency |
Transfer file in active mode with delay |
Transfer completes slowly or fails |
Transfer Types - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Set Transfer Type to ASCII |
Set transfer type to ASCII |
Transfer type set successfully |
2 |
Set Transfer Type to Binary |
Set transfer type to Binary |
Transfer type set successfully |
3 |
Set Transfer Type to EBCDIC |
Set transfer type to EBCDIC |
Transfer type set successfully |
4 |
Upload Text File in ASCII Mode |
Upload .txt file in ASCII mode |
File uploaded with correct formatting |
5 |
Upload Binary File in Binary Mode |
Upload .exe file in binary mode |
File uploaded without corruption |
6 |
Upload Text File in Binary Mode |
Upload .txt file in binary mode |
File uploaded successfully |
7 |
Upload Binary File in ASCII Mode |
Upload .exe file in ASCII mode |
File corrupted or error shown |
8 |
Download Text File in ASCII Mode |
Download .txt file in ASCII mode |
File downloaded with correct formatting |
9 |
Download Binary File in Binary Mode |
Download .zip file in binary mode |
File downloaded without corruption |
10 |
Download Binary File in ASCII Mode |
Download .zip file in ASCII mode |
File corrupted or error shown |
11 |
Download Text File in Binary Mode |
Download .txt file in binary mode |
File downloaded successfully |
12 |
Upload File in EBCDIC Mode |
Upload file using EBCDIC encoding |
File uploaded with EBCDIC format |
13 |
Download File in EBCDIC Mode |
Download file using EBCDIC encoding |
File downloaded with EBCDIC format |
14 |
Switch from ASCII to Binary |
Change transfer type mid-session |
Transfer type switched successfully |
15 |
Switch from Binary to ASCII |
Change transfer type mid-session |
Transfer type switched successfully |
16 |
Switch from ASCII to EBCDIC |
Change transfer type mid-session |
Transfer type switched successfully |
17 |
Upload HTML File in ASCII Mode |
Upload .html file in ASCII mode |
File uploaded with correct formatting |
18 |
Upload Image File in Binary Mode |
Upload .jpg file in binary mode |
File uploaded without corruption |
19 |
Upload CSV File in ASCII Mode |
Upload .csv file in ASCII mode |
File uploaded with correct formatting |
20 |
Upload Executable in Binary Mode |
Upload .exe file in binary mode |
File uploaded successfully |
21 |
Upload PDF in Binary Mode |
Upload .pdf file in binary mode |
File uploaded successfully |
22 |
Upload Unicode Text in ASCII Mode |
Upload UTF-8 text in ASCII mode |
File may be corrupted |
23 |
Upload Unicode Text in Binary Mode |
Upload UTF-8 text in binary mode |
File uploaded successfully |
24 |
Upload File with Special Characters in ASCII |
Upload file with special characters |
Characters may be altered |
25 |
Upload File with Special Characters in Binary |
Upload file with special characters |
Characters preserved |
26 |
Upload File with Line Breaks in ASCII |
Upload file with different line endings |
Line endings converted |
27 |
Upload File with Line Breaks in Binary |
Upload file with different line endings |
Line endings preserved |
28 |
Upload File with Tabs in ASCII |
Upload file with tab characters |
Tabs preserved or converted |
29 |
Upload File with Tabs in Binary |
Upload file with tab characters |
Tabs preserved |
30 |
Upload File with Control Characters in ASCII |
Upload file with control characters |
Characters may be altered |
31 |
Upload File with Control Characters in Binary |
Upload file with control characters |
Characters preserved |
32 |
Upload File with Mixed Content in ASCII |
Upload file with text and binary data |
File corrupted |
33 |
Upload File with Mixed Content in Binary |
Upload file with text and binary data |
File uploaded successfully |
34 |
Upload File with BOM in ASCII |
Upload file with Byte Order Mark |
BOM may be altered |
35 |
Upload File with BOM in Binary |
Upload file with Byte Order Mark |
BOM preserved |
36 |
Upload File with Encoding Errors in ASCII |
Upload file with invalid characters |
Errors may occur |
37 |
Upload File with Encoding Errors in Binary |
Upload file with invalid characters |
File uploaded successfully |
38 |
Upload File with Compression in Binary |
Upload compressed file |
File uploaded successfully |
39 |
Upload File with Compression in ASCII |
Upload compressed file |
File corrupted |
40 |
Upload File with Encryption in Binary |
Upload encrypted file |
File uploaded successfully |
41 |
Upload File with Encryption in ASCII |
Upload encrypted file |
File corrupted |
42 |
Upload File with Metadata in Binary |
Upload file with metadata |
Metadata preserved |
43 |
Upload File with Metadata in ASCII |
Upload file with metadata |
Metadata may be lost |
44 |
Upload File with BOM in EBCDIC |
Upload file with BOM in EBCDIC mode |
BOM may be altered |
45 |
Upload File with Unicode in EBCDIC |
Upload UTF-8 file in EBCDIC mode |
File may be corrupted |
46 |
Upload File with ASCII in EBCDIC |
Upload ASCII file in EBCDIC mode |
File converted to EBCDIC |
47 |
Upload File with Binary in EBCDIC |
Upload binary file in EBCDIC mode |
File corrupted |
48 |
Upload File with EBCDIC in Binary |
Upload EBCDIC file in binary mode |
File preserved |
49 |
Upload File with EBCDIC in ASCII |
Upload EBCDIC file in ASCII mode |
File corrupted |
50 |
Upload File with EBCDIC in EBCDIC |
Upload EBCDIC file in EBCDIC mode |
File uploaded successfully |
Multiple Platforms - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Connect from Windows Client |
Connect to FTP server from Windows |
Connection successful |
2 |
Connect from Linux Client |
Connect to FTP server from Linux |
Connection successful |
3 |
Connect from macOS Client |
Connect to FTP server from macOS |
Connection successful |
4 |
Connect from Android App |
Connect using FTP client on Android |
Connection successful |
5 |
Connect from iOS App |
Connect using FTP client on iOS |
Connection successful |
6 |
Connect from Embedded Device |
Connect from an IoT/embedded system |
Connection successful |
7 |
Upload File from Windows |
Upload file from Windows system |
File uploaded successfully |
8 |
Upload File from Linux |
Upload file from Linux system |
File uploaded successfully |
9 |
Upload File from macOS |
Upload file from macOS system |
File uploaded successfully |
10 |
Download File to Windows |
Download file to Windows system |
File downloaded successfully |
11 |
Download File to Linux |
Download file to Linux system |
File downloaded successfully |
12 |
Download File to macOS |
Download file to macOS system |
File downloaded successfully |
13 |
Upload File with Windows Line Endings |
Upload file with CRLF endings |
Line endings preserved or converted |
14 |
Upload File with Unix Line Endings |
Upload file with LF endings |
Line endings preserved or converted |
15 |
Upload File with macOS Line Endings |
Upload file with CR endings |
Line endings preserved or converted |
16 |
File Permission Handling on Linux |
Upload file and check permissions |
Permissions set correctly |
17 |
File Permission Handling on Windows |
Upload file and check access |
File accessible |
18 |
File Permission Handling on macOS |
Upload file and check access |
File accessible |
19 |
Directory Listing on Windows |
List directory contents |
Files listed correctly |
20 |
Directory Listing on Linux |
List directory contents |
Files listed correctly |
21 |
Directory Listing on macOS |
List directory contents |
Files listed correctly |
22 |
Rename File on Windows |
Rename file from Windows client |
File renamed successfully |
23 |
Rename File on Linux |
Rename file from Linux client |
File renamed successfully |
24 |
Rename File on macOS |
Rename file from macOS client |
File renamed successfully |
25 |
Delete File on Windows |
Delete file from Windows client |
File deleted successfully |
26 |
Delete File on Linux |
Delete file from Linux client |
File deleted successfully |
27 |
Delete File on macOS |
Delete file from macOS client |
File deleted successfully |
28 |
Use Passive Mode on Windows |
Transfer file in passive mode |
Transfer successful |
29 |
Use Passive Mode on Linux |
Transfer file in passive mode |
Transfer successful |
30 |
Use Passive Mode on macOS |
Transfer file in passive mode |
Transfer successful |
31 |
Use Active Mode on Windows |
Transfer file in active mode |
Transfer successful |
32 |
Use Active Mode on Linux |
Transfer file in active mode |
Transfer successful |
33 |
Use Active Mode on macOS |
Transfer file in active mode |
Transfer successful |
34 |
Connect via CLI on Linux |
Use command-line FTP client |
Connection successful |
35 |
Connect via GUI on Windows |
Use GUI FTP client |
Connection successful |
36 |
Connect via Terminal on macOS |
Use terminal FTP client |
Connection successful |
37 |
Upload Unicode File from Windows |
Upload file with Unicode name |
File uploaded successfully |
38 |
Upload Unicode File from Linux |
Upload file with Unicode name |
File uploaded successfully |
39 |
Upload Unicode File from macOS |
Upload file with Unicode name |
File uploaded successfully |
40 |
Upload File from Mobile FTP App |
Upload file from Android/iOS |
File uploaded successfully |
41 |
Download File to Mobile FTP App |
Download file to Android/iOS |
File downloaded successfully |
42 |
Upload File from Web-based FTP Client |
Use browser-based FTP client |
File uploaded successfully |
43 |
Download File to Web-based FTP Client |
Use browser-based FTP client |
File downloaded successfully |
44 |
Upload File from Virtual Machine |
Upload file from VM (e.g., VMware) |
File uploaded successfully |
45 |
Download File to Virtual Machine |
Download file to VM |
File downloaded successfully |
46 |
Upload File from Docker Container |
Upload file from containerized app |
File uploaded successfully |
47 |
Download File to Docker Container |
Download file to container |
File downloaded successfully |
48 |
Upload File from Cloud Platform |
Upload file from cloud VM (e.g., AWS EC2) |
File uploaded successfully |
49 |
Download File to Cloud Platform |
Download file to cloud VM |
File downloaded successfully |
50 |
Cross-Platform Compatibility |
Upload from one OS, download on another |
File integrity maintained |
Control & Data Channels - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Establish Control Channel |
Connect to FTP server |
Control channel established |
2 |
Send Command Over Control Channel |
Send USER command |
Server responds appropriately |
3 |
Send Invalid Command |
Send malformed command |
Server returns error |
4 |
Open Data Channel for File Transfer |
Initiate file transfer |
Data channel opens successfully |
5 |
Close Data Channel After Transfer |
Complete file transfer |
Data channel closes properly |
6 |
Keep Control Channel Alive During Transfer |
Transfer file |
Control channel remains active |
7 |
Send Command During Data Transfer |
Send command while transferring |
Command queued or rejected |
8 |
Reuse Control Channel for Multiple Transfers |
Transfer multiple files |
Control channel reused successfully |
9 |
Control Channel Timeout |
Leave control channel idle |
Session times out |
10 |
Data Channel Timeout |
Leave data channel idle |
Transfer fails with timeout |
11 |
Control Channel Encryption (FTPS) |
Use FTPS for control channel |
Encrypted control channel established |
12 |
Data Channel Encryption (FTPS) |
Use FTPS for data channel |
Encrypted data channel established |
13 |
Control Channel on Port 21 |
Connect using default port |
Connection successful |
14 |
Data Channel on Dynamic Port |
Transfer file |
Data channel uses dynamic port |
15 |
Control Channel Disconnection |
Disconnect control channel |
Session terminated |
16 |
Data Channel Disconnection |
Disconnect data channel mid-transfer |
Transfer fails |
17 |
Passive Mode Data Channel |
Use passive mode |
Data channel initiated by client |
18 |
Active Mode Data Channel |
Use active mode |
Data channel initiated by server |
19 |
Control Channel with NAT |
Connect through NAT |
Control channel established |
20 |
Data Channel with NAT |
Transfer through NAT |
Data channel may require port forwarding |
21 |
Control Channel with Firewall |
Connect with firewall enabled |
Control channel may be blocked |
22 |
Data Channel with Firewall |
Transfer with firewall enabled |
Data channel may be blocked |
23 |
Control Channel Logging |
Enable logging |
Commands logged correctly |
24 |
Data Channel Logging |
Enable logging |
Transfer details logged |
25 |
Control Channel with Proxy |
Connect via proxy |
Control channel established |
26 |
Data Channel with Proxy |
Transfer via proxy |
Data channel established |
27 |
Control Channel with VPN |
Connect via VPN |
Control channel established |
28 |
Data Channel with VPN |
Transfer via VPN |
Data channel established |
29 |
Control Channel with TLS |
Use TLS encryption |
Secure control channel |
30 |
Data Channel with TLS |
Use TLS encryption |
Secure data channel |
31 |
Control Channel with Multiple Clients |
Multiple clients connect |
All control channels managed independently |
32 |
Data Channel with Multiple Transfers |
Multiple transfers initiated |
Data channels handled correctly |
33 |
Control Channel with Unicode Commands |
Send commands with Unicode |
Server handles correctly |
34 |
Data Channel with Unicode Filenames |
Transfer files with Unicode names |
Files transferred correctly |
35 |
Control Channel with Invalid Encoding |
Send command with wrong encoding |
Server returns error |
36 |
Data Channel with Invalid Encoding |
Transfer file with wrong encoding |
File may be corrupted |
37 |
Control Channel with Compression |
Compress control channel |
Commands transmitted correctly |
38 |
Data Channel with Compression |
Compress data channel |
File transferred correctly |
39 |
Control Channel with Session Persistence |
Maintain session across reconnect |
Session resumes or re-authenticates |
40 |
Data Channel with Resume Support |
Resume interrupted transfer |
Transfer resumes successfully |
41 |
Control Channel with Command Queue |
Queue multiple commands |
Commands executed in order |
42 |
Data Channel with Parallel Transfers |
Transfer multiple files simultaneously |
All transfers succeed |
43 |
Control Channel with Invalid Port |
Use incorrect port |
Connection fails |
44 |
Data Channel with Port Conflict |
Use port already in use |
Transfer fails |
45 |
Control Channel with Server Restart |
Server restarts mid-session |
Control channel disconnected |
46 |
Data Channel with Server Restart |
Server restarts mid-transfer |
Transfer interrupted |
47 |
Control Channel with Load Balancer |
Connect through load balancer |
Control channel routed correctly |
48 |
Data Channel with Load Balancer |
Transfer through load balancer |
Data channel routed correctly |
49 |
Control Channel with IPv6 |
Connect using IPv6 |
Control channel established |
50 |
Data Channel with IPv6 |
Transfer using IPv6 |
Data channel established |
Logging & Auditing - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Enable Logging |
Turn on logging on FTP server |
Logging enabled successfully |
2 |
Disable Logging |
Turn off logging |
Logging disabled successfully |
3 |
Log User Login |
User logs in to FTP server |
Login event recorded in log |
4 |
Log User Logout |
User logs out from FTP server |
Logout event recorded in log |
5 |
Log File Upload |
Upload a file to server |
Upload event recorded |
6 |
Log File Download |
Download a file from server |
Download event recorded |
7 |
Log File Deletion |
Delete a file from server |
Deletion event recorded |
8 |
Log File Rename |
Rename a file on server |
Rename event recorded |
9 |
Log Directory Creation |
Create a new directory |
Directory creation logged |
10 |
Log Directory Deletion |
Delete a directory |
Directory deletion logged |
11 |
Log Failed Login Attempt |
Attempt login with wrong credentials |
Failed login recorded |
12 |
Log Successful Login |
Login with correct credentials |
Successful login recorded |
13 |
Log Session Timeout |
Session times out due to inactivity |
Timeout event logged |
14 |
Log Session Termination |
User disconnects manually |
Disconnection logged |
15 |
Log Passive Mode Transfer |
Transfer file in passive mode |
Transfer logged with mode info |
16 |
Log Active Mode Transfer |
Transfer file in active mode |
Transfer logged with mode info |
17 |
Log ASCII Transfer |
Transfer file in ASCII mode |
Transfer type logged |
18 |
Log Binary Transfer |
Transfer file in binary mode |
Transfer type logged |
19 |
Log EBCDIC Transfer |
Transfer file in EBCDIC mode |
Transfer type logged |
20 |
Log IP Address |
Record client IP address |
IP logged with session info |
21 |
Log Port Number |
Record port used for connection |
Port number logged |
22 |
Log Transfer Size |
Record size of transferred file |
File size logged |
23 |
Log Transfer Duration |
Record time taken for transfer |
Duration logged |
24 |
Log Transfer Status |
Record success/failure of transfer |
Status logged |
25 |
Log Command Execution |
Record FTP commands issued |
Commands logged |
26 |
Log Invalid Commands |
Record invalid or rejected commands |
Errors logged |
27 |
Log Permission Denied |
Attempt unauthorized action |
Permission error logged |
28 |
Log File Overwrite |
Overwrite existing file |
Overwrite event logged |
29 |
Log File Resume |
Resume interrupted transfer |
Resume event logged |
30 |
Log Concurrent Sessions |
Multiple sessions from same user |
All sessions logged |
31 |
Log Anonymous Login |
Login using anonymous credentials |
Anonymous access logged |
32 |
Log Encrypted Session |
Use FTPS/SFTP |
Encryption method logged |
33 |
Log Firewall Block |
Blocked connection attempt |
Block event logged |
34 |
Log Proxy Access |
Access via proxy |
Proxy details logged |
35 |
Log VPN Access |
Access via VPN |
VPN IP logged |
36 |
Log File Integrity Check |
Verify checksum after transfer |
Checksum result logged |
37 |
Log File Metadata |
Record file name, type, size |
Metadata logged |
38 |
Log Directory Navigation |
Change working directory |
Navigation logged |
39 |
Log Server Restart |
Restart FTP server |
Restart event logged |
40 |
Log Configuration Change |
Change FTP settings |
Change logged |
41 |
Log User Creation |
Create new FTP user |
User creation logged |
42 |
Log User Deletion |
Delete FTP user |
Deletion logged |
43 |
Log User Role Change |
Modify user permissions |
Role change logged |
44 |
Log Audit Trail Export |
Export audit logs |
Export event logged |
45 |
Log Log File Rotation |
Rotate log files |
Rotation event logged |
46 |
Log Log File Archival |
Archive old logs |
Archival event logged |
47 |
Log Log File Deletion |
Delete old logs |
Deletion event logged |
48 |
Log Access to Logs |
Access or read log files |
Access event logged |
49 |
Log Tampering Attempt |
Attempt to modify logs |
Tampering attempt logged |
50 |
Log Retention Policy |
Apply log retention rules |
Policy enforcement logged |
Reference links