Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows Server 2019 / FTP Server Quick Setup on Windows 10/11 and Windows Server

March 16, 2024 PowerShellWindows 10Windows 11Windows Server 2019Windows Server 2022

FTP Server Quick Setup on Windows 10/11 and Windows Server

In this step-by-step guide, we’ll look at how to install and configure an FTP server for easy file transfer on Windows Server. The built-in FTP server is available in all versions of Windows Server (as well as the desktop editions of Windows 10/11) and is based on the IIS web server role.

Contents:
  • Install an FTP Server on Windows and Create an FTP Site
  • Setup User Access Permission on Windows FTP Server
  • Configure FTP User Isolation on Windows
  • Install and Configure an FTP Server with PowerShell

Install an FTP Server on Windows and Create an FTP Site

To install the FTP Server role in Windows Server, open the Server Manager console, run the Add Roles and Features wizard, expand Web Server (IIS) -> FTP Server, and check the options FTP Service and FTP Extensibility.

Install FTP Server role on Windows

In Windows 10 and 11, you can install FTP server components using the Turn Windows Features on or off dialog (run the optionalfeatures command). Expand the Internet Information Services and select the FTP Server services to install.

Install FTP Server on Windows 10

Once you have installed the role, you can create an FTP site. Use the IIS management console (inetmgr) to manage an FTP server on Windows.

Create a new FTP site (Sites -> Add FTP Site).

Create FTP site

  • FTP site name: MyTestSite
  • FTP site root directory: C:\inetpub\ftproot

FTP server root folder

The next step allows you to select a certificate to encrypt and protect FTP traffic (FTP over SSL /FTPS), which is recommended for use when transferring FTP data over public networks. In this case, we don’t use encryption (No SSL option).

FTP site binding

Leave the default settings in the Authentication and Authorization step (we will configure FTP user access permissions later).

FTP server authentication and authorization settings

Setup User Access Permission on Windows FTP Server

There are two types of user authentication supported by the Windows FTP server:

  • Anonymous Authentication – Anyone can access the FTP server (anonymous or guest is specified as the name of the user and any  e-mail address as a password);
  • Basic Authentication – the user must authenticate with their Windows account (local or domain) to connect to the FTP server.

In this case, we will only allow Basic Authentication (in the Site Settings, expand the FTP Authentication section and enable only this mode).

FTP Server: Basic Authentication

To make it easier to grant access to the FTP site, create a local group called ftp_users.

create local ftp users group

Let’s create a local user ftp_user1 and add it to the group:

net user ftp_user1 /add *
net localgroup ftp_users ftp_user1 /add

Then add a domain user to that group:

net localgroup ftp_users woshub\m.korman /add

add users to ftp access group

Give the ftp_users group you created NTFS RW permissions on the C:\inetpub\ftproot directory.

Grant NTFS permissions on the FTP root folder

Next, allow specified users and groups to access the FTP site. In the IIS console, select FTP Authorization Rules -> Add allow Rule:

  • Specified roles or user groups: ftp_users (users in this group can access FTP)
  • Permissions: Read + Write (Allow both reading and writing to the FTP directory

Allow connect FTP server to specific group, set read and write permissions

Users can now connect to the FTP server. You can connect to an FTP server with any third-party FTP client, or open FTP directly from Windows Explorer.

In the File Explorer address bar, type the address of the FTP server in the format ftp://192.168.3.21/ and specify the user account and password.

connect ftp site from windows file explorer

A user should see a list of files and folders on the FTP server.

view ftp site content

In this case, all the users will connect to the root of the FTP site and will see all the files. The Windows FTP server supports isolation mode, which allows the creation of a home directory for each user.

Configure FTP User Isolation on Windows

If you need to restrict FTP users’ access to only their folders (home directories), you need to enable the FTP isolation mode. In IIS, open the FTP user isolation in the site setting.

The first two options don’t suggest user isolation:

  • FTP root directory – the user connects to the FTP site root;
  • User name directory – FTP user session starts with the %username% directory. The session will start from the ftp site root if this directory doesn’t exist.

Different modes of user isolation are available in the next three options:

    • User name directory (disable global virtual directories) – the user’s FTP session is isolated by a directory whose name corresponds to the FTP username. Users only see their own directory (it is their root FTP-directory) and cannot go beyond it (to an upper directory in the FTP tree). Any global virtual directories will be ignored;
    • User name physical directory (enable global virtual directories) – the user’s FTP session is restricted (isolated) to a physical directory that has the same name as the name of the FTP user account. A user cannot go outside their FTPHome directory. All global virtual directories are available to users;
  • FTP home directory configured in Active Directory – The FTP user is isolated within the home directory specified in their Active Directory account settings (FTPRoot and FTPDir user attributes).

FTP User isolation settings

Select the isolation mode you want to use (in this example, I am using the second option to isolate the FTP users).

Now you need to create personal directories for users in C:\inetpub\ftproot. Depending on the type of user account, the path to the FTP home directory will be different.

Account TypeSyntax of FTP Home Directory Naming
Anonymous users%FtpRoot%\LocalUser\Public
Local Windows account%FtpRoot%\LocalUser\%UserName%
Domain Windows account%FtpRoot%\%UserDomain%\%UserName%
Special IIS Manager or ASP.NET accounts%FtpRoot%\LocalUser\%UserName%

In this example, I have two users for whom I will create the following directories

  • Local user ftp_user1 ( C:\inetpub\ftproot\LocalUser\ftp_user1 )
  • Domain user woshub\m.korman ( C:\inetpub\ftproot\woshub\m.korman )

Users will now only see files in their home directories when connecting to an FTP server.

Install and Configure an FTP Server with PowerShell

You can quickly deploy an FTP server on Windows using the PowerShell script.

Install the FTP server role and management tools on Windows Server:

Install-WindowsFeature Web-FTP-Server -IncludeAllSubFeature -IncludeManagementTools

Installing the FTP server feature on Windows 10 or 11:

Enable-WindowsOptionalFeature -Online -FeatureName IIS-FTPServer
Enable-WindowsOptionalFeature -Online -FeatureName IIS-FTPSvc
Enable-WindowsOptionalFeature -Online -FeatureName IIS-FTPExtensibility

Create a local user and group using PowerShell:

$pass = ConvertTo-SecureString "myPassw0rd22!" -AsPlainText -Force
New-LocalUser -Name ftp_user1 -Password $pass
New-LocalGroup -Name ftp_users
Add-LocalGroupMember -Group ftp_users -Member ftp_user1

Create an FTP site directory and grant NTFS access permissions to the ftp_users group:

$ftproot='C:\inetpub\ftproot\MyFTP'
mkdir $ftproot
New-WebFtpSite -Name MyFTP -IPAddress "*" -PhysicalPath $ftproot -Port 21
icacls $ftproot /grant "ftp_group:(OI)(CI)(F)"

Allow to connect without using SSL:

$FtpSite="IIS:\Sites\MyFTP"
Set-ItemProperty $FtpSite -Name ftpServer.security.ssl.controlChannelPolicy -Value "SslAllow"
Set-ItemProperty $FtpSite -Name ftpServer.security.ssl.dataChannelPolicy -Value "SslAllow"

Allow basic authentication on the FTP site:

Set-ItemProperty $FtpSite -Name ftpServer.security.authentication.basicAuthentication.enabled -Value $true

Allow the specified group to access the FTP site:

Add-WebConfiguration "/system.ftpServer/security/authorization" -Location MyFTP -PSPath IIS:\ -Value @{accessType="Allow";roles="ftp_users";permissions="Read,Write"}

To restrict access to an FTP site by source IP address:

Set-ItemProperty $FtpSite -Name ftpServer.firewallSupport.externalIp4Address -Value "10.2.1.100"

Create a Windows Defender firewall rule to allow access to the FTP server:

New-NetFirewallRule -Name "FTP 21" -DisplayName "FTP 21" -Profile All -Direction Inbound -Action Allow -Protocol TCP -LocalPort 21 -Program "%windir%\system32\svchost.exe"

Restart the FTP site:

Restart-WebItem -PSPath $FtpSite

Use the Test-NetConnection cmdlet to verify that your FTP server is available:
Test-NetConnection -ComputerName yourftpservername -Port 21

7 comments
6
Facebook Twitter Google + Pinterest
previous post
How to Find Large Files on a Computer with PowerShell
next post
Adding Multiple IP Addresses (Aliases) to a Single Network Adapter

Related Reading

Configure NTP Time Source for Active Directory Domain

May 6, 2025

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Cannot Install Network Adapter Drivers on Windows Server

April 29, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

7 comments

MJ Almassud July 31, 2015 - 7:48 pm

Hi,
I am trying to build the same but I am using a secure FTP setup or FTP over SSL so I have to use a secure FTP client to access the site such as CoreFTP or filezilla and for whatever reason I am able to see other users folders even though I am not able to access them.
but I am setting this for a sensitive data transfer so I can’t allow users to see other users folders, because they can be part of different customers.
 
any ideas?

Reply
Max August 14, 2015 - 11:21 am

Try at NTFS level prevent users from displaying content of root folder (List folder permission).

Which user isolation mode do you use?

Reply
Megan September 18, 2015 - 7:43 pm

Hi,
Thank you for your instructions, very helpful! However, I need to have home directory for FTP site on D: drive not C:\inetpub\ftproot. How can I change it in Windows 2012 server?
Thank you,
megan

Reply
Max September 24, 2015 - 11:18 am

Hi
To change the default Home directory on IIS FTP server
1) Right click on the FTP site Manage FTP Site ->Advanced Settings
2) Then change the PhysicalPath> to one you want (by default %systemdrive%\inetpub\ftproot

Reply
john chandler December 23, 2015 - 10:41 am

Hi  
I’m trying to set up an FTP server that uses ActiceDirectory. My problem is that access to folders in FTP is governed by group membership. So, all members of a AD specified group have access to a specified folder. Users can be members of multiple AD groups so they can have access to multiple folders. I’m not sure how to go about this, being new to windows.
Any help is much appreciated.
Thanks
John

Reply
Max December 24, 2015 - 6:53 am

Hi, John

You can for each directory on the FTP server on the NTFS level permissions assign rights for certain   Active Directory groups

Reply
Clark February 21, 2018 - 12:05 am

Thank you. Poor documentation for the isolation portion left me guessing! The LocalUser / Domain directory was what I was missing.

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Managing Printers and Drivers on Windows with PowerShell
  • Protecting Remote Desktop (RDP) Host from Brute Force Attacks
  • How to Set a User Thumbnail Photo in Active Directory
  • Implementing Dynamic Groups in Active Directory with PowerShell
  • Match Windows Disks to VMWare VMDK Files
  • How to View and Close Open Files on Windows Server
  • How to Get My Public IP Address with PowerShell
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top