Skip to content

lorenzolarc/myftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

MyFTP


the purpose of the project is to recreate a FTP server which supports active mode and passive mode.

Compilation


Linux:

$ make

Will compile all the project

$ make clean

Will delete all object files

$ make fclean

Will delete all object files and the binary

$ make re

Will execute fclean rule and compile the project

Launching


./myftp <port> <path>

port is the port number on which the server socket listens
path is th path to the home directory for the Anonymous user

List of commands


Note you must connect you by using USER -> PASS command. Without that, no command will work (except QUIT, HELP, NOOP).
If you want to use LIST, STOR, RETR, you must be in active or passive mode.

command description example return code
USER specify a user for auth USER <SPACE> <username> <CRLF> 331
PASS specify a password for auth PASS <SPACE> <password> <CRLF> on success: 230
on failure: 530
QUIT disconnection QUIT <CRLF> 221
NOOP do nothing NOOP <CRLF> 200
HELP list available commands HELP [<SPACE> <string>] <CRLF> 214
PWD print working directory PWD <CRLF> 257
CWD change working directory CWD <pathname> <CRLF> on success: 250
on failure: 550
CDUP change working directory to parent directory CDUP <CRLF> on success: 250
on failure: 550
DELE delete a file on the server DELE <SPACE> <pathname> <CRLF> on success: 250
on failure: 550/501
PASV enable "passive" mode for data transfer PASV <CRLF> on success: 227
on failure: 550
PORT enable "active" mode for data transfer PORT <SPACE> <host-port> <CRLF> on success: 200
on failure: 550/500
LIST list files in the current working directory LIST [<SP> <pathname>] <CRLF> on success: 150 -> 226
on failure: 550/425
RETR download file from server to client RETR <SP> <pathname> <CRLF> on success: 150 -> 226
on failure: 550/425
STOR upload file from client to server STOR <SP> <pathname> <CRLF> on success: 150 -> 226
on failure: 550/425

Credit


This project was realised by Lorenzo LA ROCCA

About

Recreate a FTP server, 2nd year Epitech project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published