SMB file synchronization: permissions, security, and performance

  • SMB and Samba allow file sharing and synchronization across mixed networks while maintaining access control and compatibility with Windows.
  • Modern versions of SMB incorporate encryption, advanced signatures, and pre-authentication integrity to protect data in transit.
  • Proper configuration of NTFS permissions and ACLs is key in local servers, Azure Files, NetApp Files, and scenarios with FSLogix.
  • Cloud and hybrid solutions extend SMB to S3 or other backends, while maintaining security based on ACLs and identity roles.

File synchronization via SMB

La file synchronization via SMB It has become a critical component for any organization that shares data across Windows, Linux, NAS, Azure, AWS, or hybrid servers. When you start managing several terabytes, dozens of concurrent users, and compliance requirements, simply "sharing a folder" is no longer enough: performance, NTFS and share permissions, protocol security, and even how you migrate that data without bringing half the business to a standstill all come into play.

In this article you will find a complete guide about how SMB works, what role Samba plays in mixed environments, how to strengthen security (encryption, signatures, protocol versions), what best practices to follow with permissions and ACLs in Windows, Azure Files, Azure NetApp Files or FSLogix, and how maintain decent performance even when you move or synchronize huge volumes between servers or to the cloud.

What is SMB and why is it still key for file sharing?

The protocol Server Message Block (SMB) It is the "language" for sharing files, printers, and certain network services that Windows systems use natively. Through SMB, a client can access shared folders, open and edit files, view printers, or query certain resources as if they were on their own computer, even though they are actually located on a remote server.

SMB has evolved over the years. Each leap has brought performance improvements, enhanced security (integrated encryption, modern signatures, pre-authentication integrity), and more features designed for high-availability or virtualized environments such as Hyper-V or SQL Server on file servers.

The beauty of using SMB is that it allows integrate mixed networks (Windows, macOS, Linux, storage devices, public clouds) without forcing users to change the way they work: they continue to use File Explorer, map network drives, and They keep their documents as always..

SMB

SMB security layer: encryption, signatures, and protocol versions

SMB security is no longer an optional extra. If you share files with sensitive data and the network isn't completely trustworthy, you need it. encryption and protection against interception attacks (man-in-the-middle). Windows Server and Windows 10/11 have incorporated significant security improvements in the latest versions of the SMB protocol.

El SMB encryption It provides end-to-end protection for data traveling between client and server. Unlike solutions such as IPsec or dedicated WAN hardware, SMB encryption is configured directly on top of the protocol. It can be applied to:

  • At the shared resource level (only some folders).
  • At the server level (the entire file server).
  • In the mapping itself unit from the customer.

Typical scenarios where it makes sense to activate it include critical user or application data that traverse uncontrolled networks (vendor WANs, third-party networks, hybrid environments) or when you use SMB to provide highly available storage to services such as SQL Server or Hyper-V.

Starting with Windows Server 2022 and Windows 11, SMB 3.1.1 automatically negotiates modern cryptographic sets such as AES-256-GCM and AES-256-CCMAlthough compatibility with AES-128-GCM and AES-128-CCM remains, AES-128-GCM is typically used by default because it offers a very good balance between performance and security.

Furthermore, SMB Direct (SMB over RDMA), present in high-performance environments, can now Encrypt traffic without sacrificing direct memory accessThis reduces the performance impact compared to classic TCP when encryption is enabled.

Requirements and methods for enabling SMB encryption

Before you rush to activate encryption on all shared resources, it's a good idea to check a few things. basic prerequisites. To avoid surprises with old clients or unusual applications, here they are:

First: Have a compatible version of Windows or Windows Server with SMB 3.0 or higher. And that this protocol is enabled on both the client and server sides. Additionally, you will need administrator privileges (or equivalent) on both ends to modify the configuration.

Encryption can be enabled via graphical interface with Windows Admin Center, through PowerShell or by forcing requirements on the client through so-called "UNC protection", which allows encryption to be required even if the server does not have it configured by default.

When you enable encryption on a server or shared resource, by default only the SMB clients 3.0, 3.02 and 3.1.1 They can connect. This is a deliberate measure to ensure that all clients accessing this resource do so with encryption. Older clients or those without SMB 3.x support will be rejected unless you relax the configuration.

If your environment includes older systems that do not support SMB 3.x, you can disable unencrypted access rejection using PowerShell with the property RejectUnencryptedAccess from the SMB server. This lowers the security bar, so it's advisable to limit it.

SMB

How to enable SMB encryption: Admin Center, PowerShell, and UNC protection

In many cases, the most convenient way to manage a modern file server is Windows Admin CenterFrom its web interface you can activate encryption both at the server level and for specific shared resources without complicating things with commands.

For a specific shared resource, simply select the share name In the file sharing tab, select the option to enable SMB encryption. If you want to force the entire server to use encryption, you can go to the file server settings and set SMB 3 encryption to be mandatory for all clients, rejecting any connections that do not support it.

If you prefer the command line, PowerShell offers clear cmdlets such as Set-SmbShare, Set-SmbServerConfiguration o New-SmbShare to create and configure resources with encryption enabled from the start, as well as commands to map drives requiring privacy (-RequirePrivacy) both from PowerShell and from CMD with NET USE ... /REQUIREPRIVACY.

La UNC protection It adds another layer. It allows the client to be configured to accept only encrypted connections to specific UNC paths, even if the server doesn't require encryption by default. This is especially useful for protecting against interception attacks on untrusted networks, enforcing privacy for corporate clients.

When implementing encryption, you must consider the presence of WAN accelerators or intermediate devices on the network that rely on viewing the content in plain text. SMB encryption can interfere with their operation and cause access or performance issues.

Pre-authentication integrity and modern signature in SMB 3.x

To further strengthen security against protocol degradation attacks or negotiation manipulation, SMB 3.1.1 incorporates the so-called integrity of prior authenticationThis function calculates cryptographic hashes of the session negotiation and configuration messages. It then uses that result to derive session and signature keys.

Thanks to this mechanism, client and server can detect if someone is tampering The connection is used to force, for example, a downgrade to unencrypted SMB 2.x. If an inconsistency is detected in these hashes, the session is immediately closed.

Alongside encryption, SMB is also evolving in the area of message signatureSMB 2.0 used HMAC-SHA256, while SMB 3.0/3.02 introduced AES-CMAC, which is better optimized for modern CPUs that support AES instructions. With Windows Server 2022 and Windows 11, SMB 3.1.1 added AES-128-GMAC as a signature algorithm, offering improved performance in many scenarios.

The practical advantage is that now you can separate signature and encryption. If you ever need only a signature (integrity) without encryption, SMB allows this with modern algorithms. This gives you the flexibility to meet both audit and performance requirements.

To get the most out of these features and prevent an attacker from forcing the use of SMB 1.0, it's a good idea disable SMBv1 completely on modern servers and clients, something that Microsoft already does by default in recent versions of Windows and Windows Server.

Why you should disable SMB 1.0 as soon as possible

SMB 1.0 is a protocol outdated, inefficient, and with serious vulnerabilities These are known vulnerabilities that have been exploited by ransomware and other types of malware in recent years. Therefore, starting with certain versions of Windows 10 and Windows Server, it is no longer installed by default.

If you still have any servers or computers with SMB 1.0 enabled in your environment, the first sensible step is plan its disposal. The current recommendation is to disable it on both servers and clients. It is recommended to maintain only SMB 2.x and 3.x. This drastically reduces the attack surface and prevents a legitimate connection from being downgraded to an unencrypted or poorly secure version.

In Windows environments, you can manage SMB 1.0 using optional system features, PowerShell, or remote administration tools. It's advisable to thoroughly document which services might depend on it to avoid any surprises later.

In some very specific scenarios (for example, legacy activation centers), you may have no choice but to maintain SMB 1.0 in an isolated and highly controlled network segment. These are very specific exceptions with significant security trade-offs.

Synchronization and migration of large volumes of SMB without interrupting service

One of the most annoying challenges in real life is migrating or synchronize large SMB directories (we are talking about 10 TB or more) from one server to another or to another platform, without leaving the company unable to write to shared resources for several days.

The classic approach is usually this:

  1. Disable writing to the old share.
  2. Use a tool like robocopy to copy all content while maintaining NTFS permissions.
  3. Configure the new shares on the destination server.
  4. Update unit assignments.
  5. Ask users to restart their computers.

This works, but it has the problem that during the long copy no one can save changes to the source.

On very large volumes and slow disks, the initial copy may take more than one weekendThis directly impacts the business. If you leave the share in use while copying, you risk losing changes, deletions, or file moves made during the migration window.

In these cases, the strategy involves combining multiple passes with robocopy (First a bulk copy, then changes only) and schedule a very short final cut window during which writing is disabled. Then an incremental synchronization is performed using /MIR or similar, and access is redirected to the new server. For VHDX and other very large files, it may be necessary to schedule specific windows. Or even storage-level replication if the storage array allows it.

Alternatively migrate in piecesThis involves moving large folders in phases and clearly communicating path changes to users. The downside is that this often complicates the user experience.

ACL in SMB

Permissions and ACLs in SMB for FSLogix, Azure Files, and Azure NetApp Files

In modern desktop or application virtualization environments, such as those used FSLogixUser profiles are stored in VHD(X) containers on SMB resources. These resources can reside on traditional file servers, in Azure Files, in Azure NetApp Files or even over gateways like AWS Storage Gateway.

FSLogix uses UNC paths (VHDLocations or CCDLocations) to locate the profile and Office containers. The security of this data depends on two layers:

  • The NTFS permissions (Windows ACL) in the shared resource.
  • The sharing level permissions assigned to Entra ID identities in Azure Files.

In Azure Files, it is highly recommended to configure a default sharing permission of the type "Storage file data SMB share collaborator" applied to all authenticated identities. This is essential for them to be able to read and write. To manage granular ACLs, certain users or groups are granted a collaborator role with elevated privileges on the share.

The recommended practice for these scenarios is to use what is called user-based accessEach user must own their own profile folder or VHD(X) file. Domain administrators and support groups, on the other hand, have full control for maintenance tasks.

To configure this, typical ACLs are established where the domain administrators group The CREATOR OWNER has full control over the entire structure, has modification permissions over subfolders and files, and the domain users group has modification permissions only over the root folder so that its directories can be created.

Apply Windows ACLs: icacls, Explorer, and SIDDirSDDL in FSLogix

In Windows you can use the command line tool icacls To apply recommended NTFS permissions en masse to a shared resource, including the root folder and all its subdirectories and files, which is very useful when preparing shares for FSLogix, roaming profiles, or multi-user repositories.

With icacls you can, for example, Disable inheritance At the root of the shared resource, grant special permissions to CREATOR OWNER, domain administrators, and domain users, and ensure that each new folder created inherits that permission structure correctly.

If you prefer a graphical environment, the one itself Windows File Explorer It allows you to edit advanced permissions: disable inheritance, add security principals (such as CREATOR OWNER, domain groups, etc.), define what they apply to (only this folder, subfolders and files, etc.) and mark permission levels such as Modify or Full Control.

FSLogix also offers an interesting option called SIDDirSDDLThis configuration accepts an SDDL string that defines the ACLs that will be automatically applied to the user's directory upon creation. To generate this string, a test folder is typically created. Within this folder, permissions are adjusted to the desired structure, the SDDL is extracted using PowerShell (Get-Acl | Select SDDL), and then the owner and creator-owner sections are adapted to dynamically use the user's SID.

Once SIDDirSDDL is configured in the FSLogix policies, each time a user logs in for the first time, their directory will be created with the exact permissions defined in that SDDL. This saves us from having to correct ACLs afterward or run additional scripts.

Cloud SMBs and file gateways: Azure, AWS, and hybrid storage

In addition to the classic on-premises file server, many organizations today use cloud SMB storage services such as Azure Files, Azure NetApp Files, or hybrid solutions that expose SMB at the edge and store data in S3 or other backends, such as AWS Storage Gateway in file gateway mode.

In Azure Files, the typical workflow is as follows:

  1. Create a SMB file sharing resource.
  2. Link it to an identity source (traditional Active Directory, Azure AD Domain Services, etc.).
  3. Assign share permissions to users or groups of Entra ID.
  4. Configure NTFS ACLs from a domain-joined computer.

In Azure NetApp Files, the steps are as follows:

  1. Create a NetApp account.
  2. Defining sites and AD DS design.
  3. Create specific SMB capacity and volume groups.
  4. Working exclusively with Windows permissions as if it were a classic file server, but backed by high-performance cloud storage.

With AWS, the console of Storage Gateway It allows you to create SMB file shares supported on S3 buckets, defining the gateway, the bucket or access point, storage class, IAM role and options such as the use or not of PrivateLink, encryption types or MIME type detection.

In these hybrid environments, the SMB and NTFS ACLs SMBs remain the fundamental mechanism for controlling who sees which files and with what level of permissions, even when object buckets or cloud volumes are being used underneath. It is especially important to coordinate SMB security with IAM roles or their equivalents to avoid inconsistencies.

By combining all these pieces, it is possible to build a file synchronization infrastructure robustSecure and with reasonable performance. Even when working with huge volumes and complex hybrid environments.

Transferring Files Between PCs: Guide with Network Cable and Wi-Fi
Related article:
Transferring Files Between PCs: Guide with Network Cable and Wi-Fi

Add as preferred source