Настройка ftp сервера на windows server 2019 iis

Настройка будет состоять из пунктов:

Настройка будет состоять из пунктов:

  • Настройка Брандмауэра
  • Создание пользователей
  • Настройка FTP-сайта
  • Изоляция пользователей

Установка FTP-сервера

Для начала нужно установить FTP-сервер.

Открываем Пуск в нижнем левом углу, Диспетчер серверов (Server Manager), плитка которого закреплена по умолчанию. Далее все основные действия по настройке будем совершать здесь. 

Находим пункт Добавить Роль и Функции (Add roles and features).

Появится мастер добавления ролей, для продолжения нажимаем Далее (Next).

В качестве типа установки выбираем Базовая Роль или Базовая Функция (based-roles or feature-based installation).

Далее из списка серверов, выбираем нужный сервер, в качестве примера он один, поэтому жмём Далее (Next).

На этапе выбора ролей отмечаем роль Веб-сервер (IIS) (Web Server (IIS)).

Откроется окно и предложит установить Консоль управления службами IIS (IIS Management Console), жмем Добавить компоненты (Add Featues), они понадобятся, чтобы администрировать FTP-сервер, жмем Далее (Next).

Следующие 2 шага пропускаем, нажимая Далее (Next).

Дойдя до пункта Службы ролей (Role Services), снимаем все галочки и выбираем Служба FTP (FTP Service) и Консоль управления службами IIS (IIS Management Console), жмем Далее (Next).

На следующем пункте проверяем все компоненты и жмём Установить (Install).

Дожидаемся окончания установки, после чего жмём Закрыть (Close).

Далее ещё нужно настроить пару моментов, не торопитесь перезагружать сервер.

Настройка Брандмауэра

Для подключения к FTP-серверу необходимо настроить Firewall. Для этого откройте Брандмауэр Windows в режиме повышенной безопасности (Windows Firewall with Advanced Security).

В вертикальном меню слева выберите Правила для входящих подключений (Inbound rules), затем в вертикальном меню справа Создать правило (New Rule).

В открывшемся окне отмечаем тип Предопределенные (Predefined) и в выпадающем списке выберите FTP-сервер (FTP Server). Нажмите Далее (Next).

Отмечаем все галочки, Далее (Next), Готово (Finish). Перезагружаем сервер для применения всех настроек.

Создание пользователей

Теперь нужно создать пользователей, которым дадим право подключаться к FTP-серверу.

Открываем Управление компьютером (Computer Management).

Открываем пункт Локальные пользователи и группы (Local Users and Groups), щелкаем правой кнопкой мыши по пункту Пользователи (Users) и выбираем Новый пользователь (New User). Заполняем необходимые поля, снимаем все галочки и  жмем Создать (Create).

Если появилась следующая ошибка при создании пользователя, значит пароль не соответствует нужным требованиям:

Пароль должен соответствовать как минимум трём условиям из списка перечисленного ниже:

  • Наличие прописных букв английского алфавита от A до Z;
  • Наличие строчных букв английского алфавита от a до z;
  • Наличие десятичных цифр (от 0 до 9);
  • Наличие неалфавитных символов (например, !, $, #, %).

Настройка FTP-сайта

Открываем Диспетчер служб IIS (Internet Information Server (IIS) Manager).

В окне Подключения (Connections), кликаем правой кнопкой мыши по нашему сайту, выбираем Добавить FTP-сайт (Add FTP Site).

В открывшемся окне Добавить FTP-сайт (Add FTP Site) вводим название нашего FTP-сайта, указываем нужную директорию и жмём Далее (Next).

Далее указываем IP-адрес из выпадающего списка, или указываем Все свободные (All Unassigned). Отмечаем галочку ниже. Указываем настройки SSL, если нужно чтобы использовалось шифрование, устанавливаем SSL-сертификат, если нет, то выбираем первый вариант, как показано в примере. Жмём Далее (Next).

Выбираем проверку подлинности как Обычную (Basic). Из выпадающего списка выбираем Указанные пользователи (Specified users), и вводим имя ранее созданного пользователя. Ставим галочки напротив необходимых разрешений: Чтение (Read) или Запись (Write). Нажимаем Готово (Finish).

Изоляция пользователей

Чтобы после подключения к FTP-серверу пользователь попадал в свою директорию и не имел доступ к чужим файлам других пользователей, необходимо настроить их изоляцию. Для этого откройте настройки вашего ftp сайта и выберите Изоляция пользователей (FTP User Isolation).

Выберите Каталог имени пользователя (User name directory) и Примените (Apply).

Кликаем правой кнопкой мыши по нашему FTP-сайту, выбираем Добавить виртуальный каталог (Add Virtual Directory).

В первой строке указываем имя FTP-пользователя, ниже полный путь к директории пользователя. Её нужно создать заранее. Для понимания какая директория кому принадлежит, лучше создавать директорию с именем пользователя.

Необходимо настроить права на виртуальный каталог, кликаем правой кнопкой мыши по нему, выбираем Редактировать разрешения (Edit Permission).

Переходим во вкладку Безопасность (Security) и жмём кнопку Дополнительно (Advanced).

В окне жмём кнопку Отключение наследования (Disable inheritance), в новом окне выбираем первый вариант, затем Применить (Apply) и ОК.

Жмём кнопку Изменить (Edit).

Удаляем группу пользователей Users, и добавляем нового пользователя.

В новом окне, нужно ввести имя FTP-пользователя, для проверки нажмите Проверить имена (Check Names). Если пользователь есть, строка, где вводили имя, дополнится, нажмите ОК.

Даём все права пользователю на его директорию, отметив все галочки в первой колонке, жмём Применить (Apply)ОК.

На этом все настройки завершены. Чтобы подключиться к серверу, используйте следующие доступы:

  • Хост: IP сервера
  • Пользователь: FTP-пользователь, которого вы создали
  • Пароль: Пароль от FTP-пользователя

Подключиться можно через разное ПО, например FileZilla или, если вы используете Windows — Проводник, введя в адресной строке ftp://IP-сервера, после чего откроется окно для входа.

  • Главная

  • Инструкции

  • Windows

  • Как настроить FTP-сервер на Windows Server 2019

Blog

Настройка FTP Server состоит из нескольких этапов. Сначала нужно установить сам сервер, затем — создать и изолировать пользователей, настроить брандмауэр и FTP-соединение. Рассмотрим все этапы подробно в этом руководстве.

Но сначала быстро вспомним, что такое FTP-сервер. Фактически это только часть инфраструктуры, которая позволяет передавать данные между хостами. Вторая часть — клиент. Между ними устанавливается соединение, которое использует File Transfer Protocol. 

Как Настроить FTP Сервер На Windows Server 2019

Главный плюс такого подключения — кроссплатформенность. Минусов хватает: скорость обмена файлами не очень высокая, есть проблемы с безопасностью. Но протокол все равно пользуется популярностью. 

Нам нужен хост с установленной и настроенной ОС Windows Server 2019. Заказать его можно на cloud.timeweb.com.

Вот инструкция, которая поможет организовать FTP-сервер. Названия всех разделов будут на русском. Но если у вас англоязычный интерфейс, вы тоже без проблем разберетесь.

  1. Вызовите меню «Пуск» и запустите «Диспетчер серверов». Основные настройки вы будете выбирать через эту утилиту.
  2. Нажмите «Добавить роли и функции».
  3. Запустится мастер добавления. Чтобы продолжить работу с ним, щелкните «Далее».
  4. Выберите опцию «Базовая роль или Базовая функция».
  5. Укажите сервер, где должен появиться FTP on Windows.
  6. Отметьте роль — «Веб-сервер (IIS)».
  7. Появится окно с предложением добавить консоль администрирования служб IIS. Щелкните «Добавить компоненты».
  8. Пропустите следующие два шага, менять ничего не следует.
  9. В «Службах ролей» выделите пункты «Служба FTP» и «Консоль управления службами IIS».
  10.  Проверьте список компонентов, готовых к инсталляции, и нажмите «Установить».

После завершения инсталляции закройте окно мастера. Win Server FTP готов к дальнейшей регулировке.

Настройка файрвола

Для конфигурирования файрвола, который защищает FTP сервер на Windows, зайдите в меню Tools в диспетчере и запустите Windows Firewall with Advanced Security. Далее:

  1. В левом меню перейдите к настройке правил входящих соединений.
  2. В правом меню выберите добавление правила.
  3. В настройках правила выделите тип «Предопределенные» и укажите значение «FTP-сервер».
  4. Выделите все предложенные опции и завершите конфигурирование правила.

Чтобы применить новую конфигурацию, перезагрузите сервер.

Управление пользователями

Одна из главных проблем протокола — низкий уровень безопасности. Поэтому нужно очень строго относиться к списку тех, кому можно подключаться, а кому — нет. Для этого настраиваются группы или отдельные пользователи.

  1. Откройте в диспетчере инструмент «Управление компьютером».
  2. Перейдите в «Локальные пользователи и группы».
  3. Вызовите правой кнопкой контекстное меню пункта «Пользователи» и перейдите к созданию новой учетной записи.
  4. Укажите имя и пароль. Выберите параметры учетной записи. Например, можно включить требование изменить пароль при первом подключении. Или наоборот – запретить менять пароли.

Чтобы система приняла пароль, он должен отвечать требованиям безопасности:

  • Есть строчные и прописные латинские буквы.
  • Есть цифры.
  • Есть специальные символы вроде ! или #.

Никакой кириллицы — если пароль не проходит хотя бы одной характеристике, при попытке сохранить учетную запись появится сообщение об ошибке.

Добавление сайта

Для дальнейшей работы нам нужно поднять FTP-сайт. После создания юзеров возвращаемся к диспетчеру серверов. Вся настройка FTP-сервера будет проходить здесь. Затем:

  1. Запустите инструмент «Диспетчер служб IIS».
  2. В разделе «Подключения» вызовите контекстное меню нужного сервера и выберите добавление FTP-сайта.
  3. Укажите название сайта и выберите папку, в которой хранится его содержимое.
  4. Укажите IP-адрес для подключения или установите режим «Все доступные».
  5. Настройте параметры SSL. Можно не использовать шифрование или включить его и добавить свой сертификат.
  6. Выберите базовую проверку подлинности. Выдайте разрешение на аутентификацию «Указанным пользователям». 
  7. Введите имя созданной учетки.
  8. Выдайте нужные разрешения — например, только чтение, чтение и запись. 
  9. Нажмите «Готово».

Это только один из примеров конфигурации. Можно выдать разрешения не конкретным юзерам, а сразу целым группам. Подключать или не подключать SSL, менять разрешения и адрес для подключения. Финальная конфигурация зависит от того, какие задачи вы решаете.

Изолирование каталогов

На одном из предыдущих шагов мы создали учетные записи, через которые можно подключаться к серверу. Но обычно этого недостаточно для того, чтобы обеспечить даже минимальную безопасность. Еще один важный момент — изоляция.

Допустим, мы поднимаем сервер для телевизионной компании. Он нужен для того, чтобы обмениваться видео между разными отделами. Операторы загрузили, монтажеры забрали, корреспонденты посмотрели. 

Изолирование позволяет сделать так, чтобы каждый тип пользователей имел доступ только к конкретным директориям. 

У нас есть FTP-сайт. Переходим в параметры и начинаем делить зоны доступности между разными учетными записями.

  1. Откройте «Изоляцию пользователей».
  2. Выберите «Каталог имени пользователя» и кликните «Применить».
  3. Вызовите контекстное меню FTP-сайта и создайте виртуальный каталог.
  4. Укажите логин, а в строке ниже — полный путь к папке, которой он будет пользоваться. Чтобы было проще разобраться, кому куда можно, лучше сразу в имени директории использовать логин.

У нас есть один виртуальный каталог. Изменим права доступа.

  1. Вызовите контекстное меню виртуального каталога и перейдите к редактированию разрешений.
  2. Откройте параметры безопасности и нажмите «Дополнительно».
  3. Запретите наследование и сохраните изменения.
  4. Вернитесь к параметрам безопасности.
  5. Щелкните «Изменить» под списком групп/пользователей.
  6. Удалите группу Users и добавьте нового пользователя.
  7. Впишите имя FTP-пользователя и запустите проверку имен. 
  8. Щелкните «ОК» для сохранения изменений.
  9. Выдайте новому пользователю нужные права и сохраните конфигурацию.

Организация FTP-сервера завершена.

Подключение через FTP

Мы разобрались, как создать FTP-сервер и настроить учетные записи пользователей. Напоследок посмотрим, как соединиться с нашим файловым хранилищем. 

Для установки соединения требуется клиент. Один из самых известных — FileZilla. Можно также использовать WinSCP

Для подключения потребуется:

  • IP-адрес FTP-сервера.
  • Имя и пароль от созданной учетной записи.

После установки соединения пользователь будет попадать в ту директорию, которую вы указали в настройках сайта. Если вы настроили изоляцию, то он будет попадать в виртуальный каталог и не сможет переместиться в чужие папки.

In this article, I will discuss How to set up FTP Server on Windows. I will be able to describe the method of putting in and configuring the FTP server in Windows Server 2019.

How to install FTP Server 2019 (IIS)

1- Open the Server Manager > Left side select Dashboard option and click on Add roles and features under welcome to server manager.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- Select Role-based or feature-based installation and click on next because of the installation type.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- Select the server from the server pool and click on next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

5- In the server roles, check the IIS web server role.

set up ftp server, How to Set up FTP Server on Windows Server 2019

6- Click Add features required for Web Server (IIS).

set up ftp server, How to Set up FTP Server on Windows Server 2019

7- After selecting the Web Server (IIS) role, click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

8- On the features option page, click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

9- Click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

10- In the Role Services window, check the FTP server and FTP Extensibility and click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

11- Review the confirm installation summary and click install.

set up ftp server, How to Set up FTP Server on Windows Server 2019

12- Server role installation installed successfully. Click close.

set up ftp server, How to Set up FTP Server on Windows Server 2019

Step by step, create FTP users and groups to access an FTP server in 2019

1- Create a replacement user to access the FTP server > open Server Manager > select tools and click on Computer Management.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Under computer management > Expand Local Users and Groups > select Users > right-click and select New User.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- Type user name, Description, and Password, select Password never expires, and click create.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- Now, a new user has been created.

set up ftp server, How to Set up FTP Server on Windows Server 2019

How to Create a replacement Group for local users and computers.

1- After creating a user,> Now right-click on Groups under Users and Groups and click new group.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2-  In the Group Name field, type the group’s name> a Description and click the Add button to add a user.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- Enter a character under the object names to select field > click Check Names If Windows users exist > then click Ok.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- After the user is added > Select Create button to create a group.

set up ftp server, How to Set up FTP Server on Windows Server 2019

Step by step Creates an FTP site in the IIS Manager server 2019.

1- Open IIS Manager > select Tools and Internet Information Service (IIS) Manager.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Expand your FTP server, right-click Sites, and Add FTP Site.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- Enter the FTP site name and path to the directory and click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- type your IP address in the IP Address field, Port, for encryption, select No SSL and click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

5- Under Authorization, select Basic > Specified roles or groups > type your FTP group name for users > choose read and write permissions and click Finish.

set up ftp server, How to Set up FTP Server on Windows Server 2019

6- Now, my website is showing in the tree structure of the Windows web server.

set up ftp server, How to Set up FTP Server on Windows Server 2019

How to add FTP virtual directory and add permission

1- Open This PC > open Local Disk (C) > open FTP directory > right-click, select New and click Folder to create a subdirectory.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Type a subdirectory name and press enter.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- Right-click on your FTP site and select Add Virtual Directory.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- In the Alias field, type a name and select … to add the user directory path,

set up ftp server, How to Set up FTP Server on Windows Server 2019

5- Expand Local Drive (C) > FTP directory > select the subdirectory the one you have created and click ok.

set up ftp server, How to Set up FTP Server on Windows Server 2019

6- After adding a virtual directory path, click ok.

set up ftp server, How to Set up FTP Server on Windows Server 2019

7- To configure permissions in IIS Manager > right-click on a subdirectory (for example, Jamil) and select edit Permission.

set up ftp server, How to Set up FTP Server on Windows Server 2019

8- Click on the Security tab and click the Advanced button.

set up ftp server, How to Set up FTP Server on Windows Server 2019

9- Under advanced security settings and click the Disable inheritance button.

set up ftp server, How to Set up FTP Server on Windows Server 2019

10- Select convert inherited permissions into explicit permission on the object.

set up ftp server, How to Set up FTP Server on Windows Server 2019

11- After enabling inheritance, click ok.

set up ftp server, How to Set up FTP Server on Windows Server 2019

12- Go back to the Security tab and click on the Edit button.

set up ftp server, How to Set up FTP Server on Windows Server 2019

13- Select the Users group in which all users are located and click the Remove button. After removing all users, only the directory owner has access to it.

set up ftp server, How to Set up FTP Server on Windows Server 2019

14- We need to add a Windows user with full access to the directory. Click the Add button.

set up ftp server, How to Set up FTP Server on Windows Server 2019

15- Type the username of the virtual directory > click Check Names and click Ok.

set up ftp server, How to Set up FTP Server on Windows Server 2019

16- Next, we need to permit complete control of the guide> Select the created user, check all fields Allow (Permissions), and click ok.

set up ftp server, How to Set up FTP Server on Windows Server 2019

17- Click Ok.

set up ftp server, How to Set up FTP Server on Windows Server 2019

How to set up FTP User Isolation

1- Now, we need to set up an isolation FTP For each user to get to their directory and not have access to other files after connecting to the server and selecting FTP User Isolation.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Select the user name directory and click Apply under the Action menu.

set up ftp server, How to Set up FTP Server on Windows Server 2019

How to allow FTP port in windows firewall

You need to configure the firewall for an external connection to the FTP server.

1- Open Server Manager > select Tools and Windows Defender Firewall with Advanced Security.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Select Inbound Rules and a particular New Rule under the Action menu.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- Select Predefined, select FTP Server from the drop-down list and click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- Check all the predefined rules and click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

5- Select Allow the connection, and click Finish. For these rules to take effect and restart the server.

set up ftp server, How to Set up FTP Server on Windows Server 2019

How to Access an FTP Server in Windows Explorer and Internet Explorer

You can set up an FTP server in many ways, for example, through the standard Windows utility, Explorer, or the FileZilla program.

1- I am connecting through Windows Explorer. Type FTP address in the address bar and press enter: For example, (my FTP server address is – ftp://10.0.0.50)

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Type user name, Password, check the save password box, and click Log On.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- You will see the contents of the FTP server folder.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- Now, I am connecting through Internet Explorer. Type FTP address in the address bar and press enter: For example, (my FTP server address is – ftp://10.0.0.50).

Type a user name, Password and click Log On.

set up ftp server, How to Set up FTP Server on Windows Server 2019

5- You will see the contents of the FTP server folder.

set up ftp server, How to Set up FTP Server on Windows Server 2019

1- Open This PC in Windows Explorer, and select Add a network location to open the Add Network Location Wizard.

set up ftp server, How to Set up FTP Server on Windows Server 2019

2- Click Next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

3- Select Choose a custom network location and click on Next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

4- Type your FTP address (Ex. ftp://10.0.0.50) and click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

5- Uncheck Log on anonymously, type your user name provided as your FTP login credentials, and then click next.

set up ftp server, How to Set up FTP Server on Windows Server 2019

6- Type a name for the Network location and click Finish.

set up ftp server, How to Set up FTP Server on Windows Server 2019

7- Check the box Open this network location when I click Finish.

set up ftp server, How to Set up FTP Server on Windows Server 2019

8- Type your Password in the password field, click on Save Password and click Log On to test your connection. This is the second last step in FTP setup.

set up ftp server, How to Set up FTP Server on Windows Server 2019

9- After setting up FTP Server, you can see the FTP folder.

set up ftp server, How to Set up FTP Server on Windows Server 2019

I think I did my best to Provide valuable information to you about How to set up FTP Server on Windows Server. I assure you that if you read this article entirely, You will be able to set up FTP on Windows Server.

For more information, click here

Рассмотрим в статье самый популярный способ, как настроить FTP для выделенного сервера. Инструкция подойдет для всех версий Windows Server, ведь принцип работы веб-сервера (IIS) устроен однотипно.

Вот что нужно сделать, чтобы настроить FTP на выделенном сервере:

  1. Перед началом работ убедитесь, что на выделенном сервере установлены веб-сервер (IIS) и подключены службы ролей “FTP-сервер”. Сделать это можно через Мастер добавления ролей и компонентов
  2. Мы будем настраивать соединение FTP к папке, которая находится по пути C:inetpubsitename. Рекомендуем настраивать аналогично, чтобы в процессе настройки не запутаться.

Недавно мы узнали как завести корпоративную почту на своем домене бесплатно. Как получить ящик info@domain.com за 0 рублей читайте в пошаговой инструкции Как создать почту на домене.

Создайте FTP для сайта в IIS

Откройте IIS, в колонке “Connections” кликните по папке “Sites”. В правой колонке “Actions” нажмите на “Add FTP Site”.

Настройка FTP в веб-сервере IIS

В окне “Add FTP Site” указываем название FTP и путь к папке, к которой нужно подключиться через FTP.

Устанавливаем значения:

FTP site name – название FTP

Physical path – путь к папке, к которой настраиваем FTP (у нас путь – C:inetpubsitename)

2 - добавление FTP в вебсервере IIS

Устанавливаем “No SSl” и идем далее

Устанавливаем значения:

Authentication – Обычная

Authorization – Specified users и имя пользователя для FTP (этого пользователя мы создадим позже)

Permissions – Write

Нажав Finish заканчиваем создание FTP сайта.

4 добавление FTP в вебсервере IIS

Настройте FTP для сайта

В левой колонке нажимаем на созданный FTP сайт и кликаем в меню на “FTP Authentication”.

5 - настройка FTP сайта

Проверяем что параметр “Basic Authentication” включен (Enabled). Включите, если параметр выключен.

6 - настройка FTP сайта

Переходим назад в основное меню и кликаем на “FTP User Isolation”.

7 - настройка FTP сайта

Устанавливаем значение “User name directory (disable global virtual directory)” и сохраняем (Apply).

8 настройка FTP сайта

Кроме написания инструкций, вроде настройки FTP на сервере, мы ведем разработку собственной срм системы. Посмотрите как работает наша срм на preview.inclient.ru.

Настройте виртуальную папку FTP

В левой колонке нажимаем правой клавишей мыши (далее ПКМ) и кликаем на “Add Virtual Directory”.

8_1 - Создание и настройка виртуальной папки FTP 

В окне прописываем значения:

Alias – LocalUser

Physical Path – C:inetpub

8_2 Создание и настройка виртуальной папки FTP 

Нажимаем ПКМ по созданной папке “LocalUser” в левой колонке. В окне указываем значения:

Alias – название FTP сайта (такое же как в 1 шаге)

Physical Path – C:inetpubsitename

8_4 Создание и настройка виртуальной папки FTP 

Переходим назад и кликаем на “FTP Authorization Rules”.

8_5 Создание и настройка виртуальной папки FTP 

В правой колонке нажимаем на “Add Allow Rule”, чтобы вызвать окно настроек.

8_6 Создание и настройка виртуальной папки FTP 

В окне устанавливаем значения:

Specified users – имя пользователя для FTP (мы уже указывали его в 1 шаге и скоро будем его создавать в Windows Server)

Permissions – Read

Нажимаем “OK” и завершаем настройку виртуальной папки FTP.

8_7 Создание и настройка виртуальной папки FTP 

Создайте пользователя в Windows

Переходим в Control Panel (Панель управления) и нажимаем на “User Account”.

Не можете найти Панель управления? Посмотрите статью Как открыть панель управления Windows Server 2012-2019

12 создание пользователя в Windows Server

Далее идем в “Manage another account” и нажимаем “Add a user account” (Добавить пользователя) под списком пользователей. Появится окно, заполните в нем все поля. User name укажите тоже самое, что указывали на предыдущих шагах.

12_3 создание пользователя в Windows Server

Настройте права доступа для папки FTP

Перейдите по пути C:inetpub и нажмите ПКМ по папке для которой настраиваете FTP (у нас эта папка называется sitename). Откроется окно. На вкладке “Security” кликните на “Edit”.

13 Настройка прав доступа для папки FTP

Далее нажимает на “Add”.

13_1 Настройка прав доступа для папки FTP

В окне укажите имя пользователя. Нажмите “OK”.

13_2 Настройка прав доступа для папки FTP

В окне посередине кликните по пользователю и внизу выставьте все права для него – в “Full control” поставьте галочку на “Allow”. Нажмите “OK”.

13_3 Настройка прав доступа для папки FTP

Вы окажетесь снова на вкладке “Security”, теперь нажмите на “Advanced”.

13_4 Настройка прав доступа для папки FTP

Поставьте галочку на пункте “Replace all child object permission entries with…”. Нажмите “OK”.

13_5 Настройка прав доступа для папки FTP

Появится окно с предупреждением. Ничего страшного. Нажмите “Yes”.

13_6 Настройка прав доступа для папки FTP

Настройте Windows Firewall

Теперь заключительная часть настройки FTP для Windows Server – нужно настроить файрволл. Перейдите снова в Control Panel и нажмите на Windows Frewall.

14 Настройка Windows Frewall для FTP

В левой колонке перейдите в “Allow an app or feature through Windows Firewall”. Теперь добавим службу FTP, для этого кликните на “Allow another app…”.

14_3 Настройка Windows Frewall для FTP

Нажимаем на “Browse”.

14_4 Настройка Windows Frewall для FTP

Выберите приложение ftp.exe по пути C:WindowsSystem32 и нажмите “Add”.

14_5 Настройка Windows Frewall для FTP

Появится служба “File Transfer Program”, выставьте ее права “Private” и “Public” (поставьте галочку). Затем убедитесь, что с службе “FTP Server” выставлено право “Public”. Нажмите “OK”. Все настройки завершены, можно подключаться.

14_2 Настройка Windows Frewall для FTP

Подключитесь к сайта по FTP через Total Commander

Скачайте программу с официального сайта разработчика https://www.ghisler.com/download.htm. Установите программу и запустите. Нажмите Cntrl + F (Соединение с FTP-сервером) и нажмите “Добавить”. В окне настроек заполните имя соединения, сервер, учетную запись (имя пользователя, которого мы создали на сервере) и пароль.

15 подключение total commander через FTP на Windows Server

Чтобы подключитесь к папке на сервере через FTP, нажмите “Соединиться”.

15_1 подключение total commander через FTP на Windows Server

Алексей Бегин

Блогер из Перми, веб-разработчик с десятилетним стажем. На сайте Инклиент я делюсь опытом. Рассказываю как вести личные блоги и монетизировать контент. Подпишитесь на мой телеграмм-канал Бегин про блоги, чтобы получить первым советы по блоггингу, SEO и маркетингу.

Documentation » Using WinSCP » Guides » Other »

You may want to install a secure FTP server on Windows either as standalone file storage or to have means of editing your website hosted on IIS (Internet Information Services) web server. In both cases, you can use an optional FTP Server component of the IIS. It can be installed standalone or along with a Web Server.1

  • Installing FTP Server
    • On Windows Server 2022, Windows Server 2019, Windows Server 2016 and Windows Server 2012
    • On Windows Server 2008 R2
    • On Windows Desktop (Windows 11, Windows 10, Windows 8, Windows 7 and Windows Vista)
  • Opening IIS Manager
  • Creating Certificate for the FTPS Server
  • Servers behind external Firewall/NAT
  • Windows Firewall Rules
  • Restarting FTP Service
  • Adding FTP Site
    • To a Web Site
    • Standalone FTP Site
  • Connecting to Your FTPS Server
  • Further reading

Installing FTP Server

On Windows Server 2022, Windows Server 2019, Windows Server 2016 and Windows Server 2012

  • In Windows Server Manager go to Dashboard and run Manage > Add Roles and Features.

Advertisement

  • In Add Roles and Features wizard:
    • Proceed to Installation Type step and confirm Role-based or feature-based installation.
    • Proceed to Server Roles step and check Web Server (IIS) role. Note that it is checked already, if you had IIS installed as a Web Server previously. If your are prompted to install IIS Management Console tool, confirm it.
    • Proceed to Web Server Role (IIS) > Role Services step and check FTP Server role service. Uncheck Web Server role service, if you do not need it.
    • Proceed to the end of the wizard and click Install.
    • Wait for the installation to complete.

Advertisement

Skip to the next step.

On Windows Server 2008 R2

If you do not have IIS installed yet:

  • In Windows Server Manager go to Roles node and in Roles Summary panel click Add Roles.
  • In Add Roles wizard:
    • Proceed to Server Roles step and check Web Server (IIS) role.
    • Proceed to Role Services step and check FTP Server > FTP Service role service. Uncheck Web Server role service, if you do not need it. Make sure Management Service > IIS Management Console role service is checked.
    • Proceed to the end of the wizard and click Install.
    • Wait for the installation to complete.

If you have IIS installed already (i.e. as a Web Server):

  • In Windows Server Manager go to Roles node and in Web Server (IIS) > Role Services panel click Add Role Services.
  • In Add Role Services wizard:
    • Check FTP Server > FTP Service role service.
    • Make sure that Management Service > IIS Management Console is checked.
    • Confirm with Next button.
    • Proceed to the end of the wizard and click Install.
    • Wait for the installation to complete.

Advertisement

Skip to the next step.

On Windows Desktop (Windows 11, Windows 10, Windows 8, Windows 7 and Windows Vista)

  • Go to Control Panel > Programs > Programs and Features > Turn Windows features on or off.
  • On a Windows Features window:
    • Expand Internet Information Services > FTP Server and check FTP Service.
    • Expand Internet Information Services > Web Management Tools and check IIS Management Console, if it is not checked yet.
    • Confirm with OK button.
    • Wait for the installation to complete.

Opening IIS Manager

  • Go to Control Panel > System and Security > Administrative Tools (Windows Tools on Windows 11) and open Internet Information Services (IIS) Manager.
  • Navigate to your Windows server node.

Advertisement

Creating Certificate for the FTPS Server

You need a TLS/SSL certificate to secure your FTP server. Ideally, you should acquire the certificate from a certificate authority.

You may also create a self-signed certificate locally, but in such case users of your FTPS server will be warned, when connecting to the server.

To create the self-signed certificate:

  • In IIS Manager, open IIS > Server Certificates.
  • Click on Create Self-Signed Certificate action.
  • Specify a certificate name (e.g. “FTP Server”) and submit with OK.

Self-signed certificates created by old versions of IIS Manager do not work with FTPS clients that check for key usage violations.2 To create a certificate with a correct key usage, use New-SelfSignedCertificate PowerShell as an Administrator:

New-SelfSignedCertificate -FriendlyName "FTP Server" -CertStoreLocation cert:localmachinemy -DnsName ftp.example.com

Servers behind external Firewall/NAT

If your server is behind an external firewall/NAT, you need to tell the FTP server its external IP address, to allow passive mode connections.

  • In IIS Manager, open FTP > FTP Firewall Support.
  • Specify your server’s external IP address.
    For Microsoft Azure Windows servers you will find the external IP address in Public IP address section of the virtual machine page.

When behind an external firewall, you need to open ports for data connections (obviously in addition to opening an FTP port 21 and possibly an implicit TLS/SSL FTP port 990). You won’t probably want to open whole default port range 1024-65535. In such case, you need to tell the FTP server to use only the range that is opened on the firewall. Use a Data Channel Port Range box for that. Any time you change this range, you will need to restart FTP service. Learn how to open ports on Microsoft Azure.

Advertisement

Click Apply action to submit your settings.

Some external firewalls are able to monitor FTP control connection and automatically open and close the data connection ports as needed. So you do not need to have whole port range opened all the time, even when not in use. This won’t work with the secure FTPS as the control connection is encrypted and the firewall cannot monitor it.

Windows Firewall Rules

An internal Windows firewall is automatically configured with rules for the ports 21, 990 and 1024-65535 when IIS FTP server is installed.

The rules are not enabled initially on some versions of Windows.3 To enable or change the rules, go to Control Panel > System and Security > Windows Defender Firewall4 > Advanced Settings > Inbound Rules and locate three “FTP server” rules. If the rules are not enabled, click on Actions > Enable Rule.

Restarting FTP Service

While the internal Windows firewall is automatically configured to open FTP ports when FTP server is installed, this change does not seem to apply, until FTP service is restarted. The same is true for changing data channel port range.

To restart FTP service go to Control Panel > System and Security > Administrative Tools (Windows Tools on Windows 11) and open Services. Locate Microsoft FTP Service and click Restart service.5

Adding FTP Site

To a Web Site

If you want to add FTP server to manage your existing web site remotely, locate your web site node in IIS Manager and:

  • Click Add FTP Publishing action.
  • In Add FTP Site Publishing wizard:
    • On an initial Binding and SSL Settings step, select Require SSL to disallow non-encrypted connections and select your certificate.
    • On Authentication and Authorization Information step, select Basic authentication and make sure Anonymous authentication is not selected. Select which users (Windows accounts) you allow to connect to the server with what permissions. You can choose All users or select only some. Do not select Anonymous users.
    • Submit with Finish button.

Advertisement

Your secure FTPS server is now running and can be connected to.

Standalone FTP Site

If you want to add a standalone FTP server to store/exchange files, locate Sites node (folder) of your Windows server in IIS Manager and:

  • Click Add FTP Site action.
  • In Add FTP Site wizard:
    • On an initial Site Information step, give a name to your FTP site (if it’s the only site you are going to have, simple “FTP site” suffice) and specify a path to a folder on your server’s disk that is going to be accessible using FTP.
    • On a Binding and SSL Settings step, select Require SSL to disallow non-encrypted connections and select your certificate.
    • On Authentication and Authorization Information step, select Basic authentication and make sure Anonymous authentication is not selected. Select which users (Windows accounts) you allow to connect to the server with what permissions. You can choose All users or select only some. Do not select Anonymous users.
    • Submit with Finish button.

Your secure FTPS server is now running and can be connected to.

Connecting to Your FTPS Server

For connecting to a Microsoft Azure Windows instance, see a specific guide.

Start WinSCP. Login Dialog will appear. On the dialog:

  • Select FTP protocol and TLS/SSL Explicit encryption.
  • Enter your Windows server hostname to Host name field. Avoid using an IP address to allow WinSCP to verify that the hostname matches with host the server’s certificate was issued to (not applicable to self-signed certificates).
  • Specify username and password for Windows account you want to connect with (when using domain accounts, you need to specify a full username with format domainusername).
  • You may want to save your session details to a site so you do not need to type them in every time you want to connect. Press Save button and type site name.
  • Press Login to connect.
  • If you are using self-signed certificate, you will be prompted to accept it.

Advertisement

Further reading

  • Installing secure FTP server on Microsoft Azure using IIS;
  • Installing SFTP/SSH Server on Windows using OpenSSH;
  • Upload files to FTP server or SFTP server;
  • Automate file transfers (or synchronization) to FTP server or SFTP server.

FTP is a famous network protocol to transfer files internally and externally over the TCP protocol. When you have a Windows 2016 or 2019 server on your environment, you may need to set up FTP site and configure proper permissions to make the file transfer simple, faster and secure. The below step by step guide explains how to install and configure FTP service on Windows 2012 R2 (and later versions) servers. Also, the reference links show how to enable FTP incoming packets in the Windows firewall without disabling firewall services completely.

Windows 2012 R2 has Internet Information Services (IIS) version 8.5 with several improvements. The later Windows Server Operating Systems such as 2016 and 2019 has the latest IIS. FTP  server settings are available under IIS service, hence the IIS role needs to be installed before setting up FTP site on the Windows server.

Steps to Install and Configure FTP on Windows Server

1) Let us install the web service (IIS) role first.

Open server manager and select Add Roles and Features.

select Add Roles and Features

Click Next and select Role-based installation, to install any roles or features on Windows server this should be selected.

role based installation

Select the local server and click Next.

2) Select Web Server (IIS) and all recommended features in the popup screen as below.

Select IIS to install

3) It is not required to select any other features in the Features page.

When you reached the Web server Role features, select FTP services and FTP extensibility (optional only) features.

select ftp services

4) Confirm the selection and click Install to start the installation.

Once the FTP server role has been installed, you can access the IIS (Internet Information Services Manager) from server manager from Windows 2012 R2.

Open IIS Feature

5) It will open the IIS settings where you can host the www websites and FTP sites. But for this demonstration purpose, we will create and set up an FTP site only.

Few things you need to consider before implementing an FTP server setup.

  • Are you going to use SSL (Certificate) or Non-SSL security settings on your FTP site?
  • SSL is more secured and the traffic will be encrypted. But you need to have a valid internal or external certificate for this purpose if you select SSL.
  • How users will be authenticated? Is it local or integrated with Active Directory?
  • How are you going to manage read-only and write access to your FTP site?
  • If the server has multiple network cards and IPs, on which IP do you want to publish your FTP site? Based on these points, you have to bind the FTP service to particular IP (NIC) in Windows server.

Once you have decided above points, go to our earlier guide, which shows how to install and setup FTP on Windows 10 OS. The settings and configuration steps are very similar.

Remember, setting up the permission for your FTP site is very important. Because we do not need to give write access to all users and in most of the time, none of the users should read the files on the FTP site without authentication (that means, no anonymous access).

FTP access in Windows Server

Must Do Steps

You will be needing to set up and allow FTP traffic through the Windows firewall or any other specific firewall/Antivirus software you have installed. Once you have done all setup, you can check the connectivity, permission and access level by using any FTP client program, like Filezilla.

— Advertisement —

Hi, it is very good to be with you again!. In this opportunity, we will talk about FTP servers and how to installed it in Windows Server 2019. File Transfer Protocol is a service used for sending and obtaining files between two remote computers (client and servers) running on a computer network. In spite of being one of the oldest protocols to exchange data, still is very used around the world, and this is because of some advantage that we will describe below. It is really easy to use, allows to transfer a lot of data, offers a good speed of connection and an effective data transfer.

Although this may be true, it presents a serious security issue, inasmuch as, all the information is sending in a clear-text sign-in protocol, including username and password of the account. In that sense, if a malicious user intercepts connection, then he can steal valuable data. For secure transmission that protects the username and password, and encrypts the content, FTP is often secured with SSL/TLS (FTPS) or replaced with SSH File Transfer Protocol (SFTP).

Installing FTP Server in Windows Server 2019. Adding Web Server (IIS)

In order to install FTP server, we need to assign a static IP to our connection. Then go the dashboard and select Add roles and features

Add roles and features

Add roles and features

On the nex window, we select next. The wizard is a very intuitive tool for configuring services of the server.

Starting the wizard

Starting the wizard

Select Role-based or feature-based installation

Select the first option. Role-based or featured installation

Select the first option. Role-based or featured installation

Select the server where we will install the services.

Select the server

Select the server

Next, on the list of roles to install, we need to check Web Server (IIS), a new window will be open with a description of the features required to manage it. Just select Add features and later press next.

Adding Web Server (IIS) and management tools

Adding Web Server (IIS) and management tools

In addition, press Next twice until we getting to role services windows. Once there, check FTP Server and select next to continue the installation. Then, select install to start the procedure and we have to wait until the installation is completed.

Adding group and users to FTP Server

Now, we must add users and groups on Active Directory Domain, with this intention, that feature would be installed in Windows Server, if you do not how to do it, please check our site’s article. For the purpose of it, in the dashboard, select Active Directory Users and Computers

Enter in Active Directory Users and Computers

Enter in Active Directory Users and Computers

In the next windows, we will create two users (for example) and a group to add them. For it, select user folder, right-clicking on it, New, User. And just type the user’s credentials as you wish, like the name and password. In my particular case, I added two users: rogerpol and josuepol.

Adding users

Adding users

Now, we need to create a group where users will belong. Once again, click on user, new and group.

Add group

Add group

Assign the group’s name, in my case I use telematic.ftp.

Add the group’s name. Use global options and security types.

Select both of the users to add to the group recently created, by right-clicking on names.

Adding users to FTP group

Adding users to FTP group

The next point is to create the repository where we have to store the FTP information, for this we create a folder in the C drive, called Totem FTP (for example) and this must be edited as follows. Right-click on Properties and there, we select the Security tab, click on Advanced.

Assigning security´s attributes to FTP folder

Assigning security´s attributes to FTP folder

We need to click on disable inheritance, in the popup window select convert inherited permissions into explicit permissions on this object.

Disabling inheritance

Disabling inheritance

Now again in the Security tab click on Edit and there we will remove the Users group

Removing Users group

Removing Users group

We will add the group we have created for FTP, in my case telematic.ftp and provide the necessary permissions by activating the corresponding boxes. Click Apply and then Accept

Adding FTP group

Adding FTP group
Assigning permissions for FTP group
Assigning permissions for FTP group

Creating FTP site

Now is time to create our FTP site. For the purpose of that, we have to open dashboard, tools and select Internet Information Services (IIS) Manager.

Select Internet Information Services (IIS) Manager

Select Internet Information Services (IIS) Manager

On the window, select Sites in order to add FTP Site

Adding FTP Site

Adding FTP Site

Assign FTP site name and specific physical path to the folder previously created and press Next.

Assign FTP name and Path to it

Assign FTP name and Path to it

Select Ip Address to site and select No SSL. And press next.

Setting IP Address and security`s features

Setting IP Address and security`s features

Set Basic authentication, to management entry by user and password, and allow authorization to the group previously created (in my case: telematic.ftp) just press next and our FTP site will be created.

FTP Site finally created

FTP Site finally created

Testing FTP server

In order to test our FTP site, we must run a CMD terminal and type ftp ip address (in my case is 192.168.1.59) and insert user and password.

Login succeed!

Login succeed!

This is it, It has been a long, but very productive way. Now we can seize the advantages of this feature.

FTP,  an acronym for File Transfer Protocol, is a standard protocol for sharing files over the internet or a simple LAN. FTP servers have existed for over 30 years and have facilitated file sharing in a simple, yet effective manner.

Nowadays, FTP has been replaced by more secure options, such as SFTP (Secure File Transfer Protocol) and FTPS (FTP over SSL), that encrypt data sent to and from the servers. Nonetheless, it’s prudent that we appreciate the basics of installing an FTP server and see how it can be configured for simple file sharing.

In this guide, we take you through the installation and configuration of the FTP server on Windows Server 2019. There are two ways you can install the FTP server. You can use the Server Manager graphical tool, or use Windows Powershell if you enjoy working on the terminal. We will cover each of these in turn.

How to Install FTP Server using Server Manager

Server Manager is a graphical console that was introduced in Windows Server 2008. The objective was to help System Administrators easily install and manage various features and roles on the server. To install the  FTP server using Server Manager, follow the steps as illustrated.

Step 1: Launch Server Manager

Usually, the server manager utility launches automatically upon logging in. Alternatively, you can click on the ‘Start’ menu button and select ‘Server Manager’ from the pull-up menu that appears.

Once launched, click on the ‘Add roles and features’ option as shown.

Step 2: Proceed with the installation

Clicking the  ‘Add roles and features’ option launches the installation wizard. The Wizard gives you a summary of the tasks you can perform such as adding/removing roles and features. You will be required to have a few prerequisites in order before proceeding.

Once you have gone over the summary, simply click ‘Next’.

Step 3: Select the Installation Type

In the next step choose ‘Role-based or feature-based’ installation and click ‘Next’.

Step 4: Select the Destination Server

You will thereafter be required to select the server upon which you will install the roles and features. By default, the server you are working on will be selected. Just accept the defaults and hit ‘Next’.

Step 5: Select Server Roles to be Installed

In the next step, a list of server roles will be listed. Click on the ‘Web Server IIS’ option. 

This launches a pop-up window that lists the roles to be installed as shown. 

Click on ‘Add features’  and hit the ‘Next’ button to proceed to the next step.

Step 6: Select Server Features

Nothing much is required in this step, so once again, click on the ‘Next’ button.

Step 7: Web IIS overview

The next step gives you a glance about what a web server is and the role it plays. So, once again, simply click ‘Next’ to proceed to the next step.

Step 8: Select Role Services

This is the quintessential step where we shall select the FTP feature. Simply scroll and check off the ‘FTP Server’ checkbox and the corresponding FTP sub-options (FTP service and FTP extensibility). Then click ‘Next’.

Step 9: Confirm Installation

Finally, you will be presented with a summary of the roles and features that you have selected to be installed. To confirm and initiate the installation process, click on the ‘Install’ button.

The installation will take a while, so some patience will come in handy. Once the installation is complete, reboot your server for the roles and features to be fully enabled.

As we mentioned, we can install FTP using Windows Powershell. All the steps that we have just gone through can be summarized in one single command on Windows  Powershell as follows: 

Install-WindowsFeature Web-FTP-Server -IncludeManagementTools

Step 10: Create and FTP directory

To this point, we have installed the FTP server feature on the system, and a root default directory is created to that effect. The path of the root directory is at C:inetpub

We are going to create a custom FTP directory where we are going to place files and directories which can be accessed by authorized users across the network. 

Therefore, navigate to the  C:inetpub path. Right click and select ‘New’ then ‘Folder’. Give the folder your preferred name. In this case, we have created a folder called myFTPdirectory.

We need to assign this directory the required permissions so that an authorized user can read from its contents. To achieve this, right-click on the directory and select ‘Properties’.

In the ‘Properties’ window pop-up, click on the ‘Security’ tab to adjust the permissions. Select the group which you want to allow access to the directory. In this case, I have selected the ‘Users’ group. Then click on the ‘Edit’ button to assign permissions to the group.

For our example, we clicked on ‘Full control’ and hit the ‘Apply’ button.

 Then click ‘Ok’. This takes you back to the Properties window where, once again, you will click on the ‘Ok’ button.

Step 11: Create an FTP Site

We have assigned all permissions on our FTP directory to the Users group. The next step will be to create an FTP site which we shall map to the FTP directory.

On the Server manager, click on ‘Tools’ then select ‘Internet Services Information (IIS) Manager’ option.

On the IIS Manager window that appears, click the  server name at the left pane to reveal more options.  Right-click on the ‘Sites’ option and select ‘Add FTP site’.

In the next step, provide the FTP site name and the Physical Path by clicking on the adjacent button with three dots and navigating to the FTP directory that we created in the previous step. 

Then click ‘Ok’ then ‘Next’ to go to the next step.

In the ‘Binding and SSL settings’ step, provide your server’s IP address, FTP port. Be sure to select the -‘No SSL’ option since we are not using an SSL certificate to secure the site.

The final step requires you to select the authentication type and configure which users will have access to the FTP site. Select ‘Basic’ authentication. 

Under authorization, click on the ‘Specified users’ option – if you want a single user to access the site – and right below that specify the username of the user.

 Alternatively, you can allow a group of users by selecting ‘Specified roles or user groups’ and specifying the user group in the ‘text field’ provided. Then check off ‘Read’ and ‘Write’ permissions and hit ‘Finish’.

Up until this point, we have successfully configured  the FTP server. The only bit remaining is to configure the firewall to allow remote users to access the FTP site.

Step 12: Configure the Firewall

FTP listens on port 21, and therefore, we need to allow this port across the firewall. To start off, click on the ‘Start’  menu button and search for ‘Firewall with Advanced security

On the left pane, click on ‘Inbound rules’ and the head over to the extreme right and click on ‘New rule’.

On the ‘Rule Type’ window, select the ‘Predefined’ option and select ‘FTP server’ in the drop-down menu. Click ‘Next’.

Ensure that all the firewall rules are checked off and click ‘Next’.

Finally, click on ‘Allow the connection’ and click ‘Finish’.

Our FTP server can now be accessed remotely from either a Windows or Linux/UNIX system. The only thing remaining is to test if we can make a connection to the server.

Step 13: Test FTP server

To test if your FTP server is working as expected, head over to a remote system and launch command prompt. Next, type the command below:

ftp server-ip

You will be required to authenticate, so provide your username and password. 

The output above confirms that we have been able to successfully log in. 

Let’s try something more ambitious. We are going to create a directory and navigate into it using the commands shown:

ftp> mkdir reports
ftp> cd reports

To verify the existence of the directory, use the ls command , just as you would in a Linux system when listing files.

ftp> ls

Alternatively, You can head over to your browser and head over to the URL shown:

ftp://server-ip

In the authentication pop-up, provide your username and password and click on the ‘Sign In’ button.

And voila! There goes your directory!

This confirms that our FTP server is working as expected.

Conclusion

This brings to an end our topic today. We have successfully installed and configured FTP server on Windows Server 2019. An FTP server provides a convenient way of hosting and sharing files and directories across a network to specific users or groups of users in Active directory.

However, as we pointed out earlier, FTP is now considered unsafe and extra steps are needed to secure it using an SSL certificate to keep malicious users from eavesdropping on the communication between the FTP server and the client PC. Let us know your thoughts in the comments. Enjoy!

How to Install and Configure the FTP server with PowerShell

How to Install and Configure the FTP server with PowerShell. We have examined how to install FTP Server in Windows Server 2019 graphically in the previous tutorials, and in this article, we are going to teach you how to do this with PowerShell.

We will show you how to configure the site name, port, and root folders. Then we will explain how to create FTP users, how to authenticate users, and how to configure the SSL policy and NTFS permissions.

Available VPS Servers in Eldernode

How to Install the FTP feature

Before you can begin configuring your FTP server, you first need to install the required Windows features:

1) FTP

2) Web Server (IIS)

3) Management Tools to administer it with PowerShell

# Install the Windows feature for FTP  Install-WindowsFeature Web-FTP-Server -IncludeAllSubFeature  Install-WindowsFeature Web-Server -IncludeAllSubFeature IncludeManagementTools

How to Install and Configure the FTP server with PowerShell

After the installation completes, import the WebAdministration module.

This will map an Internet Information Services (IIS) drive (IIS:) through which we will configure our FTP site later in this article.

# Import the module  Import-Module WebAdministration

How to Configuring the site name, port, and root folder

You can create a new FTP site using the New-WebFtpSite cmdlet by providing an FTP site name, root folder for your FTP site, and port number.

Note: We are choosing port 21, which is the default FTP port, but you can also specify any custom port for your FTP site.

# Create the FTP site  $FTPSiteName = 'Default FTP Site'  $FTPRootDir = 'D:FTPRoot'  $FTPPort = 21  New-WebFtpSite -Name $FTPSiteName -Port $FTPPort -PhysicalPath $FTPRootDir

How to Install and Configure the FTP server with PowerShell

After running the cmdlet, you’ll see the FTP site and bindings in IIS Manager.

How to Install and Configure the FTP server with PowerShell

How to Create FTP users

After creating a new FTP site, you can create a Windows user or group through which you can control the access to the FTP server.

First, create the Windows local group:

# Create the local Windows group  $FTPUserGroupName = "FTP Users"  $ADSI = [ADSI]"WinNT://$env:ComputerName"  $FTPUserGroup = $ADSI.Create("Group", "$FTPUserGroupName")  $FTPUserGroup.SetInfo()  $FTPUserGroup.Description = "Members of this group can connect through FTP"  $FTPUserGroup.SetInfo()

Then we will create a new local FTP user with a username and password:

# Create an FTP user  $FTPUserName = "FTPUser"  $FTPPassword = '[email protected]'  $CreateUserFTPUser = $ADSI.Create("User", "$FTPUserName")  $CreateUserFTPUser.SetInfo()  $CreateUserFTPUser.SetPassword("$FTPPassword")  $CreateUserFTPUser.SetInfo()

Add the FTP user to the Windows group:

# Add an FTP user to the group FTP Users  $UserAccount = New-Object System.Security.Principal.NTAccount("$FTPUserName")  $SID = $UserAccount.Translate([System.Security.Principal.SecurityIdentifier])  $Group = [ADSI]"WinNT://$env:ComputerName/$FTPUserGroupName,Group"  $User = [ADSI]"WinNT://$SID"  $Group.Add($User.Path)

How to Install and Configure the FTP server with PowerShell

How to Authenticate FTP users to access FTP server data

Now enable basic authentication on the FTP site and authorize the Windows group that contains the FTP user so it can access the FTP site.

# Enable basic authentication on the FTP site  $FTPSitePath = "IIS:Sites$FTPSiteName"  $BasicAuth = 'ftpServer.security.authentication.basicAuthentication.enabled'  Set-ItemProperty -Path $FTPSitePath -Name $BasicAuth -Value $True  # Add an authorization read rule for FTP Users.  $Param = @{  Filter = "/system.ftpServer/security/authorization"  Value = @{  accessType = "Allow"  roles = "$FTPUserGroupName"  permissions = 1  }  PSPath = 'IIS:'  Location = $FTPSiteName  }  Add-WebConfiguration @param

How to Install and Configure the FTP server with PowerShell

You can also check these settings under IIS Manager >> FTP Site >> FTP Authorization Rules.

How to Install and Configure the FTP server with PowerShell

SSL policy and NTFS permissions to the FTP root folder

Change the SSL policy from Require SSL to Allow SSL connections.

$SSLPolicy = @(  'ftpServer.security.ssl.controlChannelPolicy',  'ftpServer.security.ssl.dataChannelPolicy'  )  Set-ItemProperty -Path $FTPSitePath -Name $SSLPolicy[0] -Value $false  Set-ItemProperty -Path $FTPSitePath -Name $SSLPolicy[1] -Value $false

How to Install and Configure the FTP server with PowerShell

The commands below set the NTFS permissions on the FTPRoot folder to allow the FTP user group to access the files:

$UserAccount = New-Object System.Security.Principal.NTAccount("$FTPUserGroupName")  $AccessRule = [System.Security.AccessControl.FileSystemAccessRule]::new($UserAccount,  'ReadAndExecute',  'ContainerInherit,ObjectInherit',  'None',  'Allow'  )  $ACL = Get-Acl -Path $FTPRootDir  $ACL.SetAccessRule($AccessRule)  $ACL | Set-Acl -Path $FTPRootDir

How to Install and Configure the FTP server with PowerShell

You can verify this from the FTP root folder properties under the Security tab.

How to Install and Configure the FTP server with PowerShell

# Restart the FTP site for all changes to take effect  Restart-WebItem "IIS:Sites$FTPSiteName" -Verbose

You can test the FTP server, which should allow you to access files, content, and directories under the FTP root folder.

How to Install and Configure the FTP server with PowerShell

Also, see:

Tutorial add FTP Site on Windows Server 2019

How to Create FTP in XAMPP

How to install FTP Server on windows server 2019

Dear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problem in it as soon as possible. Make time for other users and experts to answer your questions.

How to Install and Configure the FTP server with PowerShell

Goodluck.

Понравилась статья? Поделить с друзьями:
  • Настройка far manager в windows 10
  • Настройка fallout 3 для windows 10
  • Настройка failover dhcp windows server 2012
  • Настройка exchange 2013 на windows server 2012 r2
  • Настройка elan touchpad в windows 10