Skip to content

How to Install and Configure an IIS FTP Site with TLS Print

  • 0

Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.

Use explicit FTPS and require protected data transfers

IIS FTP with TLS, usually called FTPS, protects FTP control and data channels using TLS. It is not SFTP, which is a different protocol commonly provided by an SSH server. A client configured for SFTP on port 22 will not connect to an IIS explicit FTPS site on port 21. Choose the protocol required by the integration and make that choice clear to users and support staff.

This guide creates an explicit FTPS site with a trusted server certificate, named users and required TLS on both channels. Explicit FTPS begins with the FTP control connection and negotiates TLS before protected authentication and commands. Do not choose Allow SSL when the requirement is encrypted transfers: allowing TLS can still permit unencrypted behaviour. Protecting only credentials leaves the possibility of unprotected file data and does not meet the same objective.

Plan certificate, users and passive networking

Reserve an endpoint name such as transfer.corp.example and obtain a certificate trusted by the intended clients with that name in its SAN and a usable private key. Install it in the Local Computer certificate store used by IIS. Verify chain, expiry, Server Authentication purpose and revocation access. Public partners and managed internal clients may have different trust roots; an internal CA certificate is not automatically trusted by a partner.

Create a dedicated transfer directory and approved local or domain group. Define whether users need read-only downloads, uploads or both, and whether they must be isolated from each other. A single shared root is inappropriate when unrelated customers must never see one another’s files. Configure the supported IIS FTP user-isolation model and matching directory structure when required rather than relying on a cosmetic folder naming convention.

Choose a bounded passive data-port range, such as 50000–50100, and confirm it fits concurrent-transfer needs. Account for the firewall and NAT on both sides. The control connection can succeed while directory listings and file transfers fail because the separate data connection is blocked. Do not open an enormous ephemeral range merely to avoid designing the passive path.

Install the FTP role and prepare the content ACL

Use elevated Windows PowerShell to install the FTP role service and management tools. Review the feature result and confirm the Microsoft FTP Service is available. Do not assume installing the web-server role alone enabled FTP. Create a new, reviewed data directory and grant only the transfer group’s required file permissions.

Install-WindowsFeature -Name Web-Ftp-Server -IncludeManagementTools
Get-WindowsFeature Web-Ftp-*
Get-Service ftpsvc
New-Item -ItemType Directory -Path 'D:\Transfers\PartnerA' -ErrorAction Stop | Out-Null
icacls 'D:\Transfers\PartnerA' /grant:r 'CORP\DL-PartnerA-Transfer:(OI)(CI)M'
icacls 'D:\Transfers\PartnerA'

Modify is appropriate only if this group is authorized to create, edit and delete transferred files. Use a read-only ACL for download-only users. Review inherited access and retain system and administration recovery entries. Do not give the FTP account write access to website code or operating-system folders. FTP authorization and NTFS authorization must both permit the operation, and neither should be broader than the business requirement.

Create the site with mandatory TLS

In IIS Manager, add an FTP site with a descriptive name and the reviewed physical path. Select the intended local address and port 21 for this explicit FTPS example. Choose the installed certificate and Require SSL. On Authentication and Authorization, disable Anonymous Authentication, enable the approved Basic Authentication path and allow only the specified transfer group or users with the required read/write operations.

Basic Authentication is acceptable here only because TLS is required before credentials are transmitted; unprotected FTP exposes them. Verify the site’s FTP SSL Settings after the wizard and inspect the advanced channel policy: require TLS for the control channel and require TLS for the data channel. Do not choose credentials-only protection or allow an unprotected data channel to work around a client configuration issue.

Do not enable implicit FTPS on another port as an accidental alternative. If a partner specifically requires it, design and document that separate endpoint. Keep the site stopped or network-restricted until certificate, permissions and passive networking are ready. An empty transfer folder still becomes a credential and access boundary as soon as clients can authenticate.

Set the passive range and external address deliberately

At the server level in IIS Manager, open FTP Firewall Support and set the approved data-channel port range. This range is a global FTP service setting and can affect other FTP sites. For a NATed endpoint, set the external IPv4 address advertised by the relevant site to the address clients must reach; a private address in a PASV response can break external transfers.

Import-Module WebAdministration
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' `
  -Filter 'system.ftpServer/firewallSupport' -Name lowDataChannelPort -Value 50000
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' `
  -Filter 'system.ftpServer/firewallSupport' -Name highDataChannelPort -Value 50100

Permit TCP 21 and the chosen passive range through the approved Windows and upstream firewall paths, preferably scoped to known partner sources where feasible. Configure matching NAT forwarding to the FTP server. Encrypted FTP control traffic cannot be treated like ordinary cleartext FTP by a legacy inspection helper; use an FTPS-compatible policy. Apply any required FTP service restart in a maintenance window because it affects all sites and active transfers, not just the new one.

Test login, listing and transfer with a real client

Use an approved client configured for explicit FTP over TLS, the exact endpoint hostname and certificate validation. Test from the partner or external network that will actually use the service. A local login on the server bypasses much of the path that commonly fails. Do not accept an unexpected certificate simply because a credential prompt appears.

Verify a permitted login, directory listing, upload or download as authorized, and a checksum or content comparison for a disposable file. Also confirm a user outside the authorized group is rejected and that an unencrypted session cannot perform the protected workflow. A successful control-channel connection alone is insufficient; the data connection is a separate acceptance test.

Get-Service ftpsvc
Get-Website | Select-Object Name,Id,State,PhysicalPath,Bindings
Get-NetTCPConnection -State Listen -LocalPort 21
# TCP reachability only; a full FTPS client test is still required:
Test-NetConnection -ComputerName 'transfer.corp.example' -Port 21

Review FTP logs for the site ID and session, allowing for buffering, and protect them because they can include usernames and file paths. Avoid logging or sharing client transcripts that expose passwords.

Diagnose authentication and data-channel failures separately

If TLS negotiation fails, inspect hostname, certificate trust, key availability and client/server TLS compatibility. If login is rejected after TLS, check username format, account state, FTP authorization rules, NTFS access and any isolation-directory requirement. Do not enable anonymous access as a way to diagnose a named-user policy.

If login succeeds but listing or transfer stalls, inspect the passive range, advertised external address, NAT mappings, firewall inspection and client passive-mode configuration. A 550-class access error can be a path, authorization or NTFS issue rather than a network fault. Correlate client messages with FTP status, substatus and Win32 status in the server log. Preserve exact timestamps and test filenames so the two ends of the transfer can be matched.

Rollback and operate the transfer boundary

If the new site fails acceptance, stop that site and restore only its configuration and new firewall/NAT rules after reviewing dependencies. Reverting the global passive range can affect existing FTP sites, so restore it only with their owners’ agreement. Preserve uploaded data and logs before removing a directory or account. Feature uninstallation is broader than disabling one transfer endpoint.

Document the protocol, endpoint, trusted CA, certificate renewal, authorized groups, isolation model, passive range and retention process. Monitor failed logins, capacity and certificate expiry. Use an approved malware and data-handling workflow for inbound content, and remove stale access when a partner relationship ends. A secure FTPS service requires protected channels, narrow authorization and a working external data path throughout its lifecycle.

Related guidance and official references

Install IIS; Validate an HTTPS certificate; Create a scoped firewall rule.


Was this answer helpful?

« Back