TinyftpdC 實(shí)現(xiàn) Linux FTP 服務(wù)器
Tinyftpd是用C語言實(shí)現(xiàn)的簡(jiǎn)單、快速、高效的Linux FTP服務(wù)器,只需簡(jiǎn)單的配置,就可快速的將主機(jī)變成高效的FTP服務(wù)器。
模塊簡(jiǎn)介
TinyFTP分為 字符串工具模塊、參數(shù)配置模塊、socket模塊、內(nèi)部進(jìn)程間通訊模塊、系統(tǒng)調(diào)用工具模塊。
字符串工具模塊:字符串模塊主要用來處理開發(fā)過程中,各種對(duì)字符串的處理。模塊在
string.h與string.c參數(shù)配置模塊:參數(shù)配置模塊提供參數(shù)配置的功能。具體在
parseconf.h和parseconf.csocket模塊:用于socket通訊建立與數(shù)據(jù)傳輸。可見
commonsock.hcommonsock.c內(nèi)部進(jìn)程間通訊模塊:用于子進(jìn)程 與 父進(jìn)程間的通訊 與數(shù)據(jù)傳輸。
privsock.h和privsock.c系統(tǒng)調(diào)用工具模塊:主要是一些用到的系統(tǒng)調(diào)用的函數(shù)封裝。可見
sckutil.hsckutil.c
安裝
編譯
cd build/ chmod +x bulid.sh sudo ./build.sh
運(yùn)行
cd /bin sudo ./tinyftpd
配置
配置文件在當(dāng)前目錄的tinyftpd.conf
| 配置參數(shù) | 說明 |
|---|---|
| tunable_pasv_enable | 是否開啟被動(dòng)模式 |
| tunable_port_enable | 是否開啟主動(dòng)模式 |
| tunable_max_clients | 最大連接數(shù) |
| tunable_max_per_ip | 每IP最大連接數(shù) |
| tunable_listen_port | FTP服務(wù)器端口 |
| tunable_accept_timeout | accept超時(shí)間 |
| tunable_connect_timeout | connect超時(shí)間 |
| tunable_idle_session_timeout | 控制時(shí)間連接超時(shí) |
| tunable_data_connection_timeout | 數(shù)據(jù)連接時(shí)間超時(shí) |
| tunable_local_umask | 掩碼 |
| tunable_upload_max_rate | 最大上傳速度(byte/s) |
| tunable_download_max_rate | 最大下載速度(byte/s) |
| tunable_listen_address | FTP服務(wù)器IP地址 |
評(píng)論
圖片
表情
