A configurable mock FTP server for testing purposes written in Python. This server simulates basic FTP functionality with a virtual file system and customizable response behaviors.
- Virtual file system with predefined directories and files
- Support for basic FTP commands (USER, PASS, PWD, TYPE, PASV, LIST, CWD, STOR, QUIT)
- GUI control panel for command response configuration
- Configurable error responses and delays per command
- Real-time logging of FTP commands and responses
- Support for passive mode file transfers
- File upload capability (STOR command)
git clone https://github.com/funap/mock-ftp-server.git
cd ftp-mock-server
Start the server (default port 8021):
python ftpd.py
With custom port:
python ftpd.py --port 2121
/
├── README.txt
├── data.bin
├── docs/
│ ├── manual.pdf
│ ├── specs.doc
│ └── specs/
│ └── api.md
└── images/
├── photo.jpg
├── icon.png
└── thumbnails/
└── thumb1.jpg
The server includes a GUI control panel that allows you to:
- Toggle error responses for specific FTP commands
- Set response delays (0-10 seconds) for each command
- Monitor server activity in real-time
- USER - User authentication
- PASS - Password authentication
- PWD - Print working directory
- TYPE - Set transfer type
- PASV - Enter passive mode
- LIST - List directory contents
- CWD - Change working directory
- STOR - Upload file
- QUIT - Close connection
Connect to the server using any FTP client:
ftp localhost 8021
This project is licensed under the MIT License
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request