File share windows server

If you want to configure access to files over the network for one or more users, you need to configure file sharing on the computer on which these files are stored. A common way to deploy a shared resource for storing files is by configuring a Windows file share. In this case, we are talking about a Windows SMB share, and this file share can be configured on any Windows version.

This blog post explains how to configure a Windows file share on Windows Server 2019 to allow multiple users to access this share.

What Is a Fileshare

A file share is a directory on a computer, server, or virtual machine that contains files and directories that are accessible to other users via the network by using one of the supported file sharing protocols. A file share can be configured on any operating system supporting the appropriate file sharing protocol, for example, SMB or NFS. We have already covered the SMB protocol and its dialects.

Both client Windows versions (Windows XP, 7, 8, 10, etc.) and server Windows versions (Windows Server 2003, 2008, 2012, 2016, 2019, etc.) support Windows file sharing via the SMB protocol. However, Windows Server versions provide more capabilities compared to the client versions. For example, the maximum number of concurrent connections. Recently, we have compared a file server and NAS. In this blog post, we will explain how to set up a server for file sharing in Windows or, in other words, how to configure a file server.

Our Window Server Environment

We configure a Windows SMB share in Windows Server 2019 that is in a workgroup. The configuration principle for Windows machines in an Active Directory domain is identical, but you need to specify (determine) domain users and local users on computers when setting share permissions.

The parameters of our Windows file server are:

  • IP address: 192.168.101.209
  • Computer name: Win2019

The workflow in this article can be used for older Windows Server versions. As for client Windows versions, you can mostly follow the same Windows file sharing workflow for top editions like Windows XP Pro, Windows 7 Ultimate, Windows 10 Pro, etc. However, note that there may be certain limitations.

Creating Users and Groups

First of all, we need to create users. Using existing user accounts in Windows for file sharing is technically possible, but this approach is not recommended for security reasons. That is why, we will not use the existing administrator and user accounts to configure a Windows file share, and we will not provide these credentials to users accessing the share.

We will create special accounts for users who need to access the file share server. If a username and password on a file server are the same as a user’s username and password on a remote client computer for Windows logon, then credentials are not prompted when accessing a Windows SMB share. This feature makes accessing a file share more convenient for users and optimal for administrators.

Open the Computer Management window, which you can access by going to Server Manager > Tools > Computer Management. Alternatively, you can simply run the compmgmt.msc command in CMD.

Opening Computer Management for Windows file share setup

Note: In an Active Directory domain, you need to open the Active Directory Users and Computers window on a domain controller to create domain users and groups. You can do it by running dsa.msc in the command line or the Run (Win+R) prompt. Use Active Directory Users and Computers instead of Computer Management on a domain controller.

Creating users

  1. In the Computer Management Window that opens (that can also be called a collection of Microsoft Management Console snap-ins), go to System Tools > Local Users and Groups > Users.
  2. After selecting Users, right-click in the empty space of the right pane and click New User in the context menu.
    Creating a new user that will use a Windows file share

  1. Enter a user name, which will be used for user authentication when accessing a Windows file share. Keep in mind that this account can also be used for login on the current Windows Server machine. The name of our user is user1.
    1. If your file server is a domain member, the created domain user accounts can be used to log in to domain computers.
    2. Enter a password and confirm the password.
    3. Click Create
  1. We create more users the same way. The users that we create for accessing the file share server are:
    • user1, user2, user3, user4
    • user11, user12, user13, user14

Creating groups

When you need to configure access with the same settings for several users, it is more convenient to manage groups of users.

We create two groups in our fileshare server configuration example:

  • Group_A – for providing full access to the file share (Read, Write, Change). The group contains the following members: user1, user2, user3, user4.
  • Group_B – for providing read-only access to the share. The group contains the following members: user11, user12, user13, user14.

You can create a group, add users to the group, and configure access to a Windows SMB share for a group rather than adding each user separately in the share configuration and configuring the same settings for each user manually.

To create a new group:

  1. Right-click Groups in the Computer Management window and click New Group in the context menu.

Creating a group on a server for file sharing

  1. Enter a group name (which is Group_A in our case) in the New Group window (see the screenshot below).
  2. Click Add to add users to the group.
  3. In the Select Users window, enter a user name such as user1, then click Check Names. When the user name is entered correctly, this user name is underlined and displayed as a full name (ComputerName\UserName or DomainName\UserName). To continue adding users, press Space or add semicolon and enter the next user name, then click Check Names, and so on.

If you want to set access for a local user account created on the computer that is a domain member, enter the full user name manually, like this: ComputerName\UserName. You can similarly enter the full name of a domain user.

  1. After entering all needed user names and checking them, click OK to save settings and close the Select Users window.
  2. Click Create in the New Group window to finish group creation.

Creating a group for access management of file sharing servers

Windows File Sharing Setup

Once we have created the needed users and groups, we can move forward to set up the Windows file share.

  1. Select the directory that you want to share or select a new directory. We create a new directory in our example and the path to this directory is: E:\share
  1. Right-click this directory (folder) and in the context menu, hit Properties.

Opening folder properties to configure a Windows file share

Setting up sharing permissions

  1. Select the Sharing tab in the directory Properties window and click the Advanced Sharing button.
  2. Select the Share this folder checkbox in the Advanced Sharing window and click Permissions.

You can see that everyone can read the contents of the shared folder by default. Everyone is the default group containing all users on the current computer. In our example, we select Everyone and click Remove because we need to create a custom configuration.

  1. Click Add to add the needed users and groups for configuring access to the Windows SMB share for them.

How to configure Windows file sharing

  1. The Select Users or Groups window is opened.
  2. Enter the name of users and groups for which you want to configure access. In our case, we enter Group_A.
  3. Click Check Names like you did when adding users to a group. An entered name is underlined and displayed in the full format if the name is correct (and exists). You can enter multiple user or group names if needed.
  4. Click OK to save settings and close this window.

Selecting a group to which we want to share a folder

  1. We can see Group_A in the list of group or user names in the Permissions window for our share folder.
  2. Select this user/group (Group_A in our case) and select the Allow Full Control checkbox.

Setting permissions for a group that will access a Windows SMB share

  1. Then we add Group_B just like we added Group_A. Let’s keep the read-only sharing permissions for Group_B.

Configuring read-only permissions for a Windows file share

  1. We also add the built-in Administrators group and enable full access for administrators. (If a computer is a domain member, you can use the Domain Administrators group).
  2. Click OK to save permissions for the Windows file share and close the Permissions window.

Setting file system permissions

We have now configured file sharing permissions for the shared folder. In addition to that, we must configure file system permissions for this folder to set the appropriate access for users. NTFS is the file system we use on Windows volumes.

  1. Select the Security tab in the Properties window for the shared folder. Default NTFS permissions are set for CREATOR OWNER, SYSTEM, Administrators and Users.
  2. Click Edit to set permissions for a folder on the file system level.
  1. As you can see, users in the Users group have read access to this folder by default.
  2. Click Add to add the needed group or user and set permissions for them at the file system level.
  1. The Select Users or Groups window opens.
  2. Enter the name of the user or group that you want to add (Group_A in our case).
  3. Click Check Names.
  4. Hit OK to save settings.

Adding a group to configure NTFS permissions for Windows file sharing

  1. Select Group_A in the list of users and groups. Select the Allow Full Control checkbox to grant full access to Group_A.
  1. Add Group_B just like you added Group_A.
  2. We preserve the default permissions, which include Read & Execute, List folder contents, and Read for Group_B.
  3. Click OK in the Permissions window. Click OK in the shared folder Properties window.

We have configured sharing permissions and file system permissions for the shared folder. Similarly, you can create other shares on file sharing servers.

Accessing a Windows SMB Share

Now users can access the Windows file share (SMB share) from their computers.

To access the Windows SMB share from another computer, open Windows Explorer (click the My Computer or This PC icon) and enter the network address of the file server in the address bar in the format: \\Server-IP-Address or \\Server-Name

We enter the path:

\\192.168.101.209

We access this file share from a Windows machine after logging in as user1.

We can see a shared folder with the name share on our shared file server.

How to access a Windows SMB share from another computer

Double-click the shared folder to access its contents. We see the files in the shared folder. Our user1 is a member of Group_A and has full access to the shared folder contents. This user can write, edit and delete files in this shared folder.

The Windows file share is working properly

The workflow to create a hidden Windows SMB share is the same. The difference is in the file share name. Append the $ character at the end of a share name to make this shared directory hidden, for example, share_h$. A hidden file share is not displayed when you browse a file server over the network by adding the server IP address or name (\\192.168.101.209 or \\Server2019, for example).

Windows file sharing – configuring a hidden share

To access a hidden file share, you must enter the full path to the share, for example:

\\192.168.101.209\share_h$

Windows file sharing – how to open a hidden SMB share

Note: There are hidden shares created by default in Windows for system purposes and administrative access.

  • C$ for a system volume and similar shares for each disk volume
  • Admin$ – access to the %SystemRoot% directory (usually C:\Windows)
  • IPC$ – remote IPC used in named pipes

Advanced Sharing Settings

There are advanced sharing settings in the Network and Sharing Center in the Windows GUI.

To access these settings, go to Control Panel > Network and sharing center > Advanced sharing settings.

If you want to make a Windows machine visible over the network when sharing files and allow users to access shared resources, select the following options in the network profile you are using:

  • Turn on network discovery
  • Turn on file and printing sharing

These settings impact Windows Firewall settings to allow ICMP and SMB traffic.

TCP ports 445 and 139 must be opened in the firewall on the server for file sharing. Ensure that the File and Printer Sharing (SMB-In) rule in Windows Firewall is enabled to avoid issues.

Advanced sharing settings for Windows file sharing

Note that the Server service must be running in Windows to make a Windows file share work.

How to Map a Network Drive

As mentioned above, users can enter the path to the share to access shared files and folders. It is also possible to make shortcuts to the shared folders. However, this way may not be the most convenient for some users. In this case, you can map a file share as a network drive and access this network drive in My Computer or This PC (Windows Explorer) just like you would access local disk volumes.

Do the following to map a network drive:

  1. Access the file share server in Windows Explorer as explained above. Enter the server name or IP address in the address bar, for example, \\192.168.101.209
  2. Wait until the list of shared folders is displayed. You may need to enter a username and password if the credentials on the client and server don’t match.
  3. Right-click a shared folder you want to connect as a network drive and click Map network drive.
    Windows setup share drive

  1. Set the network drive parameters for the shared folder in the opened window.
  • Select a drive letter, for example, H:
  • The path to the shared folder has been automatically selected.
  • Reconnect at sign-in – the shared folder is connected automatically when a user logs into Windows on a client machine.
  • Connect using different credentials – use this option if the credentials of the user account you use to log in on a client computer don’t match the credentials of the user account configured on the file server to access the file share. An alternative use case is using the credentials of a user who has more permissions than the current logged-in user.
  1. Hit Finish to save settings and close this window.
    How to map a shared folder as a network drive

Now you can see the mapped network drive in Windows Explorer and use it for accessing the folder on the fileshare server (file server).

A Windows file share is mapped as a network drive

How to Check the Windows SMB Share Status

Configuring a Windows file share is the main point for setting up a file server. However, you need to know how to monitor shared resources, including shared folders, connection status, and opened files. This information is also useful for troubleshooting.

You can get Windows file sharing status in the Computer Management window, which you can access by running the compmgmt.msc command in CMD.

Go to System Tools > Shared Folders in the Computer Management window. There you can locate three items: Shares, Sessions, and Open Files.

  • Shares. This item shows you all folders shared on the current Windows machine, including hidden shares.
  • Sessions. This item displays all active sessions by showing connected users, computers and connection time.
  • Open files. Displays which files stored in shared folders are opened and in which mode (read/write).

You can right-click the needed item, such as an opened session or file and close this session or file (disconnect a connected user and remove the file lock).

Monitoring and management options on a server for file sharing

Configure Windows File Sharing in the Command Line

Actions we made in the graphical user interface (GUI) to set up a Windows file share can also be performed in the command line interface (CMD). Knowing how to configure a Windows SMB share in CMD can help you automate the configuration process.

Let’s configure a file share with settings identical to the settings we configured before in the GUI.

  1. Press Win+R. In the Run prompt type cmd and hit Enter to open Windows Command Line.
  2. Add a user with setting the username and password.The command syntax is:

    net user username userpassword /add

    We add user21 in CMD:

    net user user21 Password-21 /add

  3. The command to add a group is as follows:

    net localgroup groupname /add.

    We add group2 in this case:

    net localgroup group2 /add

  4. Add the user to the group by using the command like:

    net localgroup groupname username /add.

    In our case, we add user21 to group2:

    Adding users and groups for Windows file sharing in CMD

    net localgroup group2 user21 /add

  5. Now we need to create a new directory, which we will share. We go to drive E: and create the share2c directory (c means command line or console for more clarity in our directory name).

    e:

    md share2c

  6. List directory contents to ensure that the directory has been created:

    dir

  7. Share the share2c directory by setting the folder path, user or group name and permissions for this user or group. The general command syntax is:

    net share sharename=folderpath /grant:username, permissions.

    Permissions can be read, change, or full. In our case the exact command is:

    net share share2c=e:\share2c /grant:group2,full.

    We grant full permissions to group2.

    Creating a Windows SMB share in the command line

  8. Set NTFS permissions for the shared folder with icacls.
  9. We set full permissions to group2 for the E:\share2c directory:

    icacls "E:\share2c" /grant group2:(OI)(CI)F /T

    You can see how these settings applied in the command line are displayed in the GUI in the screenshot below.

    Setting NTFS permissions in the command line for Windows file sharing

  10. Check the Windows file share status.
  • Check existing file shares:

    net share

  • View sessions opened by users connected to the shares:

    net sessions

  • View files opened by users over the network:

    net files

    Monitoring shared resources in the command line

  1. Useful commands to manage working Windows file shares.
  • Close the files opened by users by defining the file id (the id is displayed with the net files command that you can see in the screenshot above):

    net file id /close

  • List opened sessions for the appropriate computer name:

    net session \\ComputerName

  • Disconnect incoming SMB connections for the selected machine:

    net session \\ComputerName /delete

  • Connect to a file share and map the file share as a network drive using the logged-in credentials:

    net use H: \\FileServer\SharedFolder

    If a file share contains spaces, you must enclose the path in quotes (“path”).

  • The alternative command:

    pushd \\FileServer\SharedFolder

Conclusion

Configuring a server for file sharing is not difficult, especially on Windows Server 2019. Keep in mind that with access granted to multiple users, files on Windows SMB shares as well as NFS shares can get corrupted or permanently deleted. Make sure to use a dedicated solution to backup Windows servers and file sharing servers. The best choice is a solution that supports multiple platforms like NAKIVO Backup & Replication.

Обновлено:
Опубликовано:

В качестве примера используется Windows Server 2012 R2 (2016, 2019). Инструкция разбита на несколько шагов и представляет из себя полный цикл настройки файлового хранилища для использования в малых и средних компаниях.

Выбор оборудования и подготовка сервера
Установка Windows и настройка системы
Базовые настройки файлового сервера
Тюнинг файлового сервера или профессиональные советы
Настройка средств обслуживания
Тестирование

Шаг 1. Выбор оборудования и подготовка сервера

В качестве сервера, желательно, выбрать профессиональное оборудование. Системные требования для файлового сервера не высокие:

  • Процессор может быть самый простой;
  • Оперативная память также не сильно используется;
  • Дисковая система — самый основной компонент. Ее объем зависит от специфики бизнеса. Примерная формула — не менее 15 Гб на пользователя и не менее 1 Тб на сервер. До 50 пользователей можно рассматривать диски SATA, после — SAS или SSD.

Например, для компании в 300 пользователей подойдет сервер с процессором Xeon E3, 8 Гб ОЗУ и 5 Тб дискового пространства на дисках SAS 10K.

Дополнительные требования

  1. Для обеспечения сохранности информации при выходе из строя жесткого диска, необходим RAID-контроллер. Настройка последнего выполняется из специального встроенного программного обеспечения, которое запускается при загрузке сервера;
  2. Сервер должен быть подключен к источнику бесперебойного питания;
  3. Необходимо предусмотреть резервное копирование. Для этого нужен дисковый накопитель (внешний жесткий диск) или другой сервер.

Подробнее о выборе оборудования читайте статью Как выбрать сервер.

Шаг 2. Установка Windows и настройка системы

Установка системы

На этом шаге все стандартно, за исключением одного нюанса: разбивая во время установки Windows жесткий диск, стараемся выделить небольшую часть (70 — 120 Гб) для системы и все остальное под данные. Если выделить много дискового пространства для системного раздела, увеличится время его обслуживания и фрагментация, что негативно скажется на производительности и надежности системы в целом.

Настройка системы

  1. Проверяем правильность настройки времени и часового пояса;
  2. Задаем понятное имя для сервера и, при необходимости, вводим его в домен;
  3. Если сервер не подключен напрямую к сети Интернет, стоит отключить брандмауэр;
  4. Для удаленного администрирования, включаем удаленный рабочий стол;
  5. Устанавливаем все обновления системы.

Шаг 3. Базовые настройки файлового сервера

Это стандартные действия, которые выполняются при настройке обычного файлового сервера.

Установка роли и вспомогательных компонентов

Как правило, данная роль устанавливается вместе с Windows. Остается только это проверить и доустановить компоненты, которые нужны для полноценной эксплуатации сервиса.

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

Нажимаем УправлениеДобавить роли и компоненты.

В открывшемся окне оставляем Установка ролей и компонентов и нажимаем Далее.

В следующем окне выбираем нужный сервер (выбран по умолчанию, если работаем на сервере, а не через удаленную консоль) и нажимаем Далее.

Среди ролей находим Файловые службы и службы хранилища, раскрываем ее и проверяем, что установлены галочки напротив следующих компонентов:

  • Службы хранения;
  • Файловый сервер;

Если данные службы не установлены, выбираем их и нажимаем Далее.

В окне Выбор компонентов просто нажимаем Далее.

Откроется окно Подтверждение установки компонентов. Нажимаем Установить и после окончания процесса перезагружаем сервер.

Настройка шары (общей папки)

Создаем первую папку, которую хотим предоставить в общее использование. Затем кликаем по ней правой кнопкой мыши и нажимаем Свойства:

В открывшемся окне переходим на вкладку Доступ и нажимаем Расширенная настройка:

Ставим галочку Открыть общий доступ к этой папке и нажимаем кнопку Разрешения:

Предоставляем полный доступ всем пользователям:

* конечно же, мы не будем давать доступ всем пользователям, но для этого есть вкладка безопасность (см. ниже).

Нажимаем OK и еще раз OK.

Теперь переходим на вкладку Безопасность и нажимаем Дополнительно:

В открывшемся окне нажимаем Отключение наследования и Преобразовать унаследованные разрешения в явные разрешения этого объекта.

Отключаем наследование прав папкой

Нажимаем OK и Изменить

Выставляем необходимые права на папку, например:

Совет: старайтесь управлять правами на ресурсы только при помощи групп. Даже если доступ необходимо предоставить только одному человеку!

Теперь нажимаем OK два раза. Папка настроена для общего использования и в нашем примере доступна по сетевому пути \\fs1\Общая папка.

Шаг 4. Тюнинг файлового сервера или профессиональные советы

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

DFS

С самого начала стоит создавать общие папки в пространстве имен DFS. На это есть две основные причины:

  1. При наличии или появлении нескольких файловых серверов пользователям будет удобнее находить общие папки в одном месте.
  2. Администратор легко сможет создать отказоустойчивую систему при необходимости.

Как создать и настроить DFS читайте в статьях Как установить и настроить DFS и Как установить и настроить DFS с помощью Powershell.

Теневые копии

Позволят вернуться к предыдущим версиям файлов. Это очень полезная функция позволит не только восстановить некорректно отредактированный документ, но и вернуть случайно удаленный файл или папку.

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

Аудит

Аудит позволит вести протокол доступа к данным — понять, кто и когда удалил важные данные или внес в них изменения.

О том, как настроить данную возможность читайте статью Как включить аудит доступа к файлам Windows. 

Анализатор соответствия рекомендациям

В диспетчер управления серверами Windows встроен инструмент для проверки конфигурации сервера — анализатор соответствия рекомендациям. Чтобы им воспользоваться переходим в диспетчере в Локальный сервер:

Находим раздел «Анализатор соответствия рекомендациям» и справа кликаем по ЗАДАЧИНачать проверку BPA:

Рассмотрим решения некоторых рекомендаций.

1. Для XXX должно быть задано рекомендованное значение.

Это набор однотипных рекомендаций, для выполнения которых нужно обратить внимание на описание и задать значение параметро, которое в нем указано. Например, для CachedOpenLimit в описании проблемы есть описание решения — «Задайте для CachedOpenLimit рекомендуемое значение 5». Чтобы это сделать, открываем Powershell от администратора и вводим команду:

Set-SmbServerConfiguration -CachedOpenLimit 5

* мы задаем параметру CachedOpenLimit значение 5, как это и рекомендовано анализатором.

На запрос, уверены ли мы, что хотим выполнить команду, отвечаем утвердительно.

Остальные параметры задаем аналогичными действиями.

2. Файл Srv.sys должен быть настроен на запуск по требованию.

В командной строке от имени администратора вводим:

sc config srv start= demand

3. Создание коротких имен файлов должно быть отключено.

В командной строке от имени администратора вводим:

fsutil 8dot3name set 1

Шаг 5. Настройка средств обслуживания

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

Резервное копирование

Для файлового сервера все просто — необходимо резервировать все рабочие папки и файлы. Лучшим решением будет ежедневное копирование новых данных, и с определенной периодичностью (например, раз в месяц), создавать полный архив.

Мониторинг

Мониторить стоит:

  1. Сетевую доступность сервера;
  2. Свободное дисковое пространство;
  3. Состояние жестких дисков.

Шаг 6. Тестирование

Тестирование состоит из 3-х основных действий:

  1. Проверить журналы Windows и убедиться в отсутствие ошибок. В случае их обнаружения, необходимо устранить все проблемы.
  2. Выполнить действия анализатора соответствий рекомендациям.
  3. Провести живой тест работы сервиса с компьютера пользователя.

Introduction

In Windows or Windows Server environment, SMB (Server Message Block) shares are essential for seamless network file sharing, allowing users and applications to access files remotely. This post explores several methods to create an SMB share, including using Server Manager, File Explorer, PowerShell, and Computer Management.

Understanding Permissions

When creating an SMB share in Windows Server, understanding how permissions work is crucial for securing access to your shared resources. Windows Server uses two types of permissions: NTFS permissions and Share permissions. These permissions control what actions users can perform on the files and folders, both locally and over the network.

NTFS Permissions

NTFS (New Technology File System) permissions are applied directly to the files and folders on the disk and determine what users can do when accessing the folder locally or over the network.

The permissions can be ranked from least restrictive (most permissive) to most restrictive (least permissive) based on the level of access they grant to files and folders. In other words:

  • More Actions Allowed = Less Restrictive: The more actions a permission allows, the less restrictive it is.
  • Fewer Actions Allowed = More Restrictive: The fewer actions a permission allows, the more restrictive it is.

Here’s the order from least restrictive to most restrictive:

  • Full Control: Allows users to do everything, including modifying permissions and taking ownership.
  • Modify: Users can read, write, and delete files, but cannot manage permissions.
  • Read & Execute: Users can view and execute files, but cannot modify them.
  • Read: Users can only view the contents of the folder.
  • Write: Users can create and modify files, but cannot delete them.

Share Permissions

Share permissions control what users can do when they access the folder over the network. Unlike NTFS permissions, these are applied only when the folder is accessed as a network share.

Combining NTFS and Share Permissions

Windows Server determines a user’s effective permissions by combining NTFS and Share permissions, with the most restrictive permission applying. For example, if a user has “Read” permission on the Share level but “Modify” permission on the NTFS level, their effective permission will be “Read” when accessing the folder over the network.

Methods to Create an SMB Share

Windows Server provides multiple methods for creating an SMB share, each offering different advantages depending on your administrative needs. Below, we’ll walk through some common approaches:

Using Server Manager

Server Manager is a powerful tool that simplifies the process of managing server roles and features, including creating SMB shares. Here is the step by step guide:

  • Make sure you have “File and iSCSI Services” Role installed first.
  • Open Server Manager and navigate to “File and Storage Services.
  • Select “Shares,” then click on the “Tasks” menu and choose “New Share.”
  • On the New Share Wizard window, under File share profile section, select “SMB Share – Quick”. Then click “Next”.
  • Under the Share location section, choose the volume you want, in this case, we choose “D” volume. Click “Next”.
  • Under Share Name, give it a name, the “Local path to share” and “Remote path to share” text boxes will automatically filled. Click “Next”.
  • Under Other Settings , select “Enable access-based enumeration” checkbox. Click “Next”.
  • Under Permission, keep things as default. Click “Next”.
  • Under Confirmation, review and click “Create”.

See screenshots of all the steps below:

Using File Explore

File Explorer offers a quick and straightforward way to create an SMB share, making it accessible even for those with minimal server management experience:

  • Right-click on the folder you want to share and select “Properties.”
  • Go to the “Sharing” tab and click “Advanced Sharing.”
  • Check “Share this folder,” set the share name, and configure permissions as needed.

See screenshots below:

Using PowerShell

PowerShell provides a versatile and scriptable method to create and manage SMB shares, perfect for automation or bulk operations:

  • Open PowerShell with administrative privileges.
  • Use the New-SmbShare cmdlet to create the share. For example:
New-SmbShare -Name "MyShare" -Path "D:\Share\MyShare" -Read "Everyone"

PowerShell is excellent for administrators who need to automate tasks or manage shares across multiple servers.

Using Computer Management

Computer Management is a versatile console that allows you to manage system tools, including shared folders, from a single interface. Here are the steps:

  • Open Computer Management and navigate to “Shared Folders” > “Shares.”
  • Right-click on “Shares” and select “New Share.”
  • On the Create a Shared Folder Wizard, Click “Next“.
  • Choose the path for the folder under “Folder path“. Click “Next“.
  • Next you will specify Name, and Description for the share folder. We keep it as default for this case. Click “Next“.
  • On the Shared Folder Permissions. We choose “All users have read-only access“. Click “Finish“.

This method is useful for managing existing shares as well as creating new ones.

See screenshots below:

Conclusion

To sum up, creating and managing SMB shares in Windows Server can be done through various methods, each suited to different administrative needs. Whether you prefer the GUI of Server Manager or the automation capabilities of PowerShell, understanding the interplay between NTFS and Share permissions is key to ensuring your shared resources are both accessible and secure.

Sharing folders makes them accessible to network users and probably you need to do. After you’ve configured disks on the server, you must share files/disks to enable network users to access files and disks. When sharing files and folders also you can enable administrators and clients to access the files, folders offline even when the server is off.

Sharing files and managing permissions with advanced settings are one of important strategy an administrator must know. Here in this article, we will discuss fully on share files and folders in Windows server 2016, no matter it’s possible to do it in Windows server 2012 and 2008 R2. So let’s get started.

Before start sharing files make sure that the advanced sharing settings is configured correctly from control panel with firewall settings then select the folder you want to share. Here we will share files with File and Storage Services, it’s already available in windows server by default.

1. Go to Server manager click File and Storage Services then click shares>tasks>New share to create a folder share on server.

New Share

2. Select a share profile for the folder you want to share then click Next.

SMB Share Quick: (SMB) is the standard file sharing used by all versions of Windows. SMB Share Quick provides basic SMB sharing with full share and NTFS permission.

SMB Share Advanced: Provides SMB sharing with full share and NTFS permission and access to services provided by File Server Resource Manager.

SMB Share Application: Provides SMB sharing with settings suitable for Hyper-V and other applications.

NFS Share Quick: (NFS) is the standard file sharing protocol used by most UNIX, Linux. NFS Share Quick provides NFS sharing with authentication permission and access to services provided by File Resource Manager.

NFS Share Advanced: Provides NFS Sharing with authentication and permission and access to services provided by File Resource Manager.

Share Profile

3. Now select the server and select a volume on the server or specify the folder path you want to share. To share a custom path, choose Type a custom path and browse the folder then click Next.

Share path

4. On the specify share name page, type a share name and click Next.

Share Name

5. Here you have to select the sharing options you need, if you don’t know the definition read then mark them if required.

  • Select any or all of the following options:
    Enable Access-Based Enumeration: Prevents users from seeing files and folders
    they do not have permission to access.
  • Allow Caching Of Share: Enables offline users to access the contents of this share.
  • Enable BranchCache On The File Share: Enables BranchCache servers to cache
    files accessed from this share.
  • Encrypt Data Access: Causes the server to encrypt remote file access to this share.

Configure Share Settings

6. Now Specify the permissions to control access read or write by clicking on Customize permissions then add, remove or change users permission and click Next.

Permissions

7. Confirm that the shared settings are configured properly and click Create.

Confirmation

The share was created successfully with its appropriate permissions, click close.

Shared

To check the folder shared go to Network>your computer then your shared files will be there.

Also you can see them by typing \\yourcomputername\ in the file explorer.

Configure file Shares using file Explorer

1. Navigate to the folder then right click and select Properties, click on sharing tab then click Advanced sharing.

Sharing

2. Mark on Share this folder and enter a share name then click on permissions to add, remove or change permissions of users and click ok.

When the folder sharing is configured properly, click Apply then ok. Your folder will be shared successfully.

Also, you can manage caching of the folder by clicking on caching and select the one you want. (Caching enables offline files for the users those who have enabled offline files. You can choose if the folder should be available offline or not.

Offline Settings

All right, this was all about configured file shares in windows server 2016, hope it would be helpful and informative.

If you have any question regarding this ask here.

Creating an SMB (Server Message Block) shared folder on Windows Server 2022 allows multiple users to access and share files efficiently within an organization. This guide will walk you through the steps to set up a secure and effective SMB shared environment, streamlining file sharing and collaboration within your business.

Understanding SMB on Windows Server 2022

SMB is a network file sharing protocol that allows applications to read and write to files and request services from server programs in a computer network. In Windows Server 2022, SMB facilitates resource sharing, such as files and printers, making it easier for users to collaborate and share information.

Visit Microsoft to learn in detail how to set up SMB sharing on Server 2022.

Key Features of Windows Server 2022 for SMB:

  • Enhanced Security: Advanced security features, including SMB over QUIC, to protect data in transit.
  • Performance Improvements: Optimized for better file sharing performance, especially in distributed networks.
  • Ease of Management: Simplified management tools to streamline the creation and management of shared resources.

Table of Contents

Step 1: Open Server Manager

  1. Launch Server Manager:
    • Click on the Start menu and select Server Manager from the list of available applications.
    • In the Server Manager dashboard, navigate to File and Storage Services.
  1. Navigate to Shares:
    • In the File and Storage Services section, click on Shares to view all existing shared folders.
    • Click on Tasks and select New Share to initiate the process.
  2. Select Share Profile:

The New Share Wizard will appear. Choose SMB Share – Quick as the profile for creating a standard SMB share and click Next.

Server manager

Click on Shared and click on Tasks and New Shared.

Server manager shares

The new share wizard will be displayed; select SMB Shared – quick and click next.

Create SMB shared - quick

In the share location window, tick the box “Type a custom path” to select the folder to share.

Create SMB share location

Find your shared folder and choose select folder.

Select folder SMB share

Click next.

New share wizard location

Specify a share name and click next.

SMB share name

Verify the configured share settings and click next.

Configure share settings

  1. Select the Folder to Share:
    • In the Share Location window, select Type a custom path to manually choose the folder you want to share.
    • Click Browse to navigate to the folder on your server that you want to share. Once selected, click Next.
  1. Name Your Share:
    • In the Share Name window, enter a name for the shared folder. This name will be used by users to access the share over the network.
    • Click Next to proceed.
  2. Review and Configure Settings:
    • Review the default share settings. If needed, adjust the settings according to your requirements.

Click Next to continue.

Specify permissions to control access

Click on the share tab.

Customize permissions SMB share

In the Share tab, click on Add.

Modify share permissions

Click on Select a principal link.

Permission entry for shared

Type domain users and click OK.

Enter the objects name to

Step 5: Specify Permissions to Control Access

  1. Set Access Permissions:
    • In the Specify Permissions window, click on Customize Permissions to define who can access the shared folder and what actions they can perform (read, write, etc.).
  2. Modify Share Permissions:
    • Under the Share tab, click Add to include users or groups who will have access to this shared folder.
    • Click on Select a Principal to choose the users or groups. For example, you might type Domain Users for general access and Domain Admins for administrative control.
    • Set the required permissions (e.g., read, write) and click OK to apply the changes.
  3. Advanced Security Settings:

If you need to set more granular permissions, click on the Advanced Security Settings link. Here you can modify permissions at a more detailed level.

Permission entry for shared

Click on the change link.

Advanced security settings for shared

Choose to select a principal.

Permission entry for shared folder

Type domain admins and click OK.

Enter the object name to

Click ok

Permission entry for folder

  1. Finish and Create the Share:
    • After configuring permissions, review the settings once more and click Create to finalize the setup.
    • A confirmation page will appear. Click Close to exit the wizard.
  2. Verify the Shared Folder:
    • The new shared folder should now appear under the Shares section in Server Manager.

You can also verify its creation by navigating to Network in File Explorer. The shared folder should be visible and accessible to the users you have granted permissions.

Specify permissions to control access

Click Create to complete the process.

New share wizard confirmation

Choose Close.

New SMB share wizard results

We see the shared folder.

Server manager shares

In File Explorer, go to Network Options, and there you will see the shared folder.

File explorer network

Conclusion

By following these steps, you can create an SMB shared folder on Windows Server 2022, enabling efficient and secure file sharing within your organization. This setup not only improves collaboration but also ensures that your shared resources are managed effectively. For more detailed information on setting up SMB sharing on Windows Server 2022.

With any of the above methods, we are able to create shared folders on Windows Server 2022.

Jamilhttp://jamiltech.com

A Professional Technology Blog Writer | An energetic professional with more than 20+ years of rich experience in Technology, Planning, Designing, Installation, and Networking.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Эмуляция windows на android планшете
  • Windows 2008 резервирование dhcp
  • Windows 10 pro winloader
  • Как поменять основную учетную запись на windows 10
  • Добавить пользователя в windows 10 без аккаунта