NOTE: The project currently supports only gFTP FTP client and has only a few FTP commands and is a work in progress. The TLS and SSL support is not implemented yet.
This project is an FTP server implemented in Rust. It supports various FTP commands and provides functionalities for file transfer, directory management, and user authentication. The server is designed to handle multiple clients concurrently using asynchronous programming with tokio.
- File Transfer: Upload and download files.
- Directory Management: Create, delete, and list directories.
- User Authentication: Basic user authentication.
- Asynchronous Handling: Efficient handling of multiple clients using
tokio.
The project uses the following dependencies:
tokio: Asynchronous runtime for Rust.serde: Serialization and deserialization framework.dotenv: Load environment variables from a.envfile.
Description: Specify the user for authentication.
Usage: USER <username>
Example:
USER anonymous
Description: Specify the password for authentication.
Usage: PASS <password>
Example:
PASS guest
Description: Terminate the connection.
Usage: QUIT
Example:
QUIT
Description: Retrieve a file from the server.
Usage: RETR <filename>
Example:
RETR example.txt
Description: Store a file on the server.
Usage: STOR <filename>
Example:
STOR example.txt
Description: Delete a file from the server.
Usage: DELE <filename>
Example:
DELE example.txt
Description: Remove a directory.
Usage: RMD <directory>
Example:
RMD /example_directory
Description: Create a directory.
Usage: MKD <directory>
Example:
MKD /example_directory
Description: Print the current working directory.
Usage: PWD
Example:
PWD
Description: List files in the current directory.
Usage: LIST
Example:
LIST
Description: Return the size of a file.
Usage: SIZE <filename>
Example:
SIZE example.txt
Ensure that you have a .env file with the necessary environment variables, such as ROOT_DIR for the server's root directory.
To run the server, use the following command:
cargo run