Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 伺服器技術 >> 關於伺服器

Windows Server 2008 / IIS 7.0 啟用 FTP 服務完整部署指南

編輯:關於伺服器

IIS 7.0 將 FTP 服務模組化,不再隨 IIS 核心安裝,需通過「角色管理工具」單獨添加。本文覆蓋 Windows Server 2008(含 R2)與 Windows Vista/7 客戶端的完整安裝、啟動、基礎配置流程。

一、安裝 FTP 服務

1. Windows Server 2008(服務器角色方式)

  1. 「開始 → 管理工具 → 服務器管理器」;
  2. 左側選「角色」,右側「角色摘要」區點擊 「添加角色服務」;
  3. 在「選擇角色服務」頁,勾選 「FTP 發布服務」(包含 FTP 服務 + FTP 管理控制台);
  4. 「下一步 → 安裝」,完成後無需重啟。

2. Windows Vista / 7 / 8 / 10(客戶端功能方式)

  1. 「控制面板 → 程序 → 開啟或關閉 Windows 功能」;
  2. 展開 Internet Information Services → FTP Publishing Service;
  3. 勾選 FTP Publishing Service、FTP Management Console、FTP Server;
  4. 確定,等待組件安裝完成。

二、啟動 FTP 服務

安裝後服務默認 未啟動,需手動啟動並設置為「自動」。

Server 2008:

# 方式一:服務器管理器
服務器管理器 → 角色 → Web 服務器 (IIS) → 系統服務 → FTP Publishing Service → 右鍵「啟動」

# 方式二:services.msc
Win+R → services.msc → 找到 "FTP Publishing Service" → 右鍵「啟動」→ 「屬性」→ 啟動類型「自動」

Client Vista/7+:

控制面板 → 系統和安全 → 管理工具 → 服務
→ "FTP Publishing Service" → 啟動 + 設置自動

三、創建 FTP 站點(基礎配置)

  1. 打開「Internet Information Services (IIS) 管理器」;
  2. 左側連接樹右鍵「站點」→ 「添加 FTP 站點」;
  3. 站點名稱: 如 CorpFTP;
    物理路徑: 如 D:\FTPRoot(預先創建、NTFS 權限配置好);
  4. 綁定與 SSL:
    IP:All Unassigned / 具體 IP
    端口:21(默認)
    SSL:無 / 允許 / 要求(生產環境強制「要求」+ 憑證);
  5. 驗證與授權:
    驗證:基本驗證(需配合 SSL)
    授權:指定用戶/角色 → 讀寫權限按業務分配;
  6. 完成向導,站點自動啟動。

四、防火牆放行

# 主動模式
netsh advfirewall firewall add rule name="FTP Inbound 21" dir=in action=allow protocol=TCP localport=21
# 被動模式端口範圍(需在 FTP 站點「FTP 防火牆支援」配置對應範圍)
netsh advfirewall firewall add rule name="FTP Passive Ports" dir=in action=allow protocol=TCP localport=40000-40100

五、常見問題速查

現象可能原因處置
530 User cannot log in用戶無 NTFS 讀權限 / 隔離模式路徑錯誤檢查物理路徑 ACL、用戶隔離設置
425 Can't open data connection被動模式端口防火牆未放行 / NAT 映射缺失放行被動端口範圍、配置 FTP 防火牆支援「外部 IP」
客戶端顯示亂碼字符集不匹配客戶端/服務端統一 UTF-8,或啟用「FTP 編碼」兼容模式

結語: IIS 7.0 FTP 服務模組化部署清晰、管理圖形化、支援 FTPS/用戶隔離/日誌/配額等企業級特性。遵循「安裝角色 → 啟動服務 → 創建站點 → 配置防火牆 → 驗證連通」標準流程,配合 NTFS 權限與 SSL 加密,即可構建合規、可用的文件傳輸服務。

Copyright © Windows教程網 All Rights Reserved