FTP Server
—— Final Project
BUPT/QMUL 2021-5-13
Agenda
◼ Project description ◼ Demonstration
◼ Timesheet
Agenda
◼ Project description ◼ Demonstration
◼ Timesheet
Project description – 1
◼ Subject:FTPServer
◼ Goals
◼ UnderstandingFTP
◼ Implement an FTP server program
◼ Using ftp command as client, and the communication between client and server could be captured by Wireshark
◼ Environment
◼ Installed Linux system in VM environment:
VirtualBox+Xshell+Xming
◼ TCP-based socket programing
◼ Clanguage
Project description – 2
◼ Basic functions (required)
◼ User login
◼ Support commands such as : PWD, CWD, LIST, MKD, DELE, RNFR/RNTO.
◼ Provide download and upload services in active mode.
◼ Display user’s info such as : IP, actions, speed, total traffic.
◼ Advanced functions (optional)
◼ Provide download and upload in passive mode. ◼ Limit download and upload speed as specified. ◼ Limit users with specified access rights.
Framework
Agenda
◼ Project description ◼ Demonstration
◼ Timesheet
Demonstration – 1
Client side: using ftp command Server side
2. client connect server
1. start server
Demonstration – 2
Client side: using ftp command Server side
3. client list remote files
4. client download “auth.txt”
Demonstration – 3
Client side: using ftp command Server side
5. client upload “lseek.c”
6. client disconnect
Agenda
◼ Project description ◼ Demonstration
◼ Timesheet
Timesheet
◼ Deadline of evaluation
◼ Lab time in the 16th week
◼ Deadline of submission ◼ 2021-06-20 22:00
◼ Teamwork
◼ Two students as a group
◼ Decide your group members now
◼ Submission
◼ ◼
◼
Report (*.pdf) and Source code (*.c, *.h, makefile) per group All files should be packed as a single file named as follows
FtpServer_01_ 2018111111李宁& 02_ 2018222222张安.zip iClass Platform
Tips
◼ 1-Installing FTP server in Linux to learn about interaction between FTP client and server
◼ Installing FTP server (vsftpd )
◼ Using ftp command to access the installed ftp server, and using Wireshark to capture client- server interactions
◼ Implementing your program as what the installed FTP server done
Install FTP Server (vsftpd) in Linux
安装vsftpd服务:sudo apt-get install vsftpd
Install FTP Server (vsftpd) in Linux
查看服务运行情况:sudo service vsftpd status
打开vsftpd服务:sudo service vsftpd start (首次安装成功时 服务自动开启 无需此命令)
Install FTP Server (vsftpd) in Linux
设置主配置文件:sudo vi /etc/vsftpd.conf
write_enable=YES (保证可以使用put命令)
Install FTP Server (vsftpd) in Linux
重启vsftpd服务:sudo service vsftpd restart (修改完配置文件后需重启服务)
Client连接:ftp 127.0.0.1
User name: student Password: 111111
Install FTP Server (vsftpd) in Linux
为了保证自己的程序能够使用FTP的well-known port number,测试自己的程序时,需关闭vsftpd服务
关闭vsftpd服务:sudo service vsftpd stop