Windows 仍佔據桌面作業系統主流,但 Linux 憑藉開放性與安全性擁有大量擁躉。如何讓雙平台實現資源共享,成為關鍵議題。因雙方均支援 FTP 等開放標準,只需雙邊架設 FTP 伺服器即可輕鬆互通。本文介紹 Linux 端以 ProFTPD 建立 FTP 服務,供 Windows 客戶端存取。
ProFTPD 運行於 UNIX/Linux/FreeBSD 等平台,遵循 GPL 授權免費使用,原始碼可自由修改。作為 WU-FTPD 替代方案,在安全性與擴展性上顯著提升。配置風格酷似 Apache,熟悉 Apache 的管理員極易上手。
穩定版 1.2.10,開發版 1.3.0rc3。下載指令:
wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.10.tar.gz
需 1.3.0rc3 時將檔名改為 proftpd-1.3.0rc3.tar.gz。
./configure --prefix=/usr/local --enable-shadow
make # 雙 CPU 建議 make -j3 加速
make install
安裝後主程式在 /usr/local/sbin/,設定檔 proftpd.conf 在 /usr/local/etc/。基本配置範例:
DefaultRoot ~ users, !staff
ServerIdent On "FreeLAMP FTP Server"
ServerName ""
ServerType standalone
ServerAdmin webmaster@freelamp.com
Bind 192.168.0.1
ExtendedLog /var/log/proftpd read,write,auth
ScoreboardPath /usr/local/var/proftpd
RequireValidShell Off
User proftpd
Group proftpd
執行 /usr/local/sbin/proftpd 即啟動 FTP 伺服器。Windows 端即可用 FTP 客戶端連線存取 Linux 共享資源。