VPS.TC
| $
Server Status
Turkey Istanbul, Türkiye
Active
USA New York, USA
Active
Cart Total:
View Cart
How to Set Up SMB File Sharing on Windows Server
Windows

How to Set Up SMB File Sharing on Windows Server

Avatar of Defne Defne 15 min read 0 Comments
Share:

Quick Summary – Windows Server File Sharing

A secure SMB share needs more than a folder and a network path. Prepare the server, separate share and NTFS permissions, restrict TCP 445, and test both access and recovery.

  • Prepare the server — Set a static IP, correct DNS, a meaningful hostname, and an appropriate network profile.
  • Create the share — Use Server Manager or PowerShell and keep shared data on a suitable data volume.
  • Control permissions — Use Active Directory security groups and test the effective combination of SMB and NTFS permissions.
  • Secure SMB — Keep SMBv1 disabled, restrict TCP 445, and enable encryption where the workload requires it.
  • Monitor access — Watch disk capacity, sessions, open files, authentication failures, and relevant security events.
  • Test recovery — Treat RAID and shadow copies as availability features, not backups, and perform regular restore tests.

To set up Windows Server file sharing safely, install the File Server role, create an SMB share, and control access through both share and NTFS permissions. Keep SMB traffic on trusted networks, disable SMBv1, restrict TCP 445, and verify the result from a normal client with real read, write, and restore tests.

Start with the server, not the share wizard

A file share can look healthy while its permissions, backups, or network boundaries are quietly wrong. I have learned to treat SMB as a small system rather than a folder with a network name: the server identity, TCP 445 access, authentication, share permissions, NTFS permissions, monitoring, and recovery all belong in the same plan.

First decide what the server is meant to do. If it only provides file shares, I do not install unrelated roles just because the wizard offers them. On Windows Server versions that support the current File Server role, PowerShell is usually quicker than Server Manager:

🚀 Boost Your Speed with VPS Server!

Speed up your projects with high-performance SSD storage and 99.9% uptime guarantee.

Get VPS Hosting
Install-WindowsFeature -Name FS-FileServer -IncludeManagementTools

That command installs the File Server role and its management tools. Nothing more.

Give the server a static IP address, a meaningful hostname, and a correct DNS record. In an Active Directory environment, join it to the domain. On a small workgroup network, avoid maintaining matching local usernames and passwords on every machine if you can use a central authentication method instead.

Check the hostname and network profile before creating anything:

☁️ Gain Flexibility with Cloud Server!

Experience the power of cloud with scalable resources and instant backups.

Cloud Server Plans
hostname
Get-NetConnectionProfile
Get-NetIPAddress -AddressFamily IPv4

You should see the expected hostname, a DomainAuthenticated or otherwise appropriate network profile, and the correct IPv4 address. There is no good reason to expose SMB directly to the internet. Keep it on a trusted LAN, VPN, or private network segment.

Before you continue: verify the hostname, DNS, static address, and network profile.

Create the share with a clear layout

In Server Manager, open File and Storage Services, select Shares, and start the New Share wizard. For most internal folders, SMB Share – Quick is the sensible choice. Select the physical folder path rather than hiding the layout from yourself.

A small file server might use a structure like this:

D:\Shares\Accounting
D:\Shares\Common
D:\Shares\Archive

I prefer shared data on a separate volume from the operating system. That makes capacity alerts, backups, and recovery work easier to reason about. Spaces and non-ASCII characters are supported, but short and consistent names cause fewer surprises in scripts, backup jobs, and older clients.

PowerShell can create the directory and share in a few lines:

New-Item -ItemType Directory -Path 'D:\Shares\Common' -Force
New-SmbShare -Name 'Common' -Path 'D:\Shares\Common' -ChangeAccess 'DOMAIN\Common-Users' -FullAccess 'DOMAIN\Domain Admins'

Here, -Name is the share name clients see and -Path is the local folder. -ChangeAccess allows users to create and modify files, while -FullAccess should stay limited to administrators.

Confirm what was created:

Get-SmbShare -Name 'Common' | Format-List Name,Path,Description,EncryptData
Get-SmbShareAccess -Name 'Common'

Clients can connect to \\FILE-SERVER\Common. An IP path such as \\192.0.2.10\Common is useful for troubleshooting, but I use the DNS name for normal operation. It keeps mapped drives independent of a future address change.

Tip

Use a DNS hostname for normal access and reserve the IP address for troubleshooting. This keeps mapped drives stable if the server address changes later.

Share permissions are only half the decision

SMB access has two permission layers: share permissions and NTFS permissions. The effective result is the intersection of both. If the share grants Change but NTFS grants only Read, the user still cannot write. A Full Control share permission cannot override a read-only NTFS ACL.

Layer When it applies Where it is managed
SMB share permission Network access Share Permissions or Grant-SmbShareAccess
NTFS permission Local and network access Security tab or icacls
Effective permission The more restrictive combination Effective Access

A practical design is to keep share permissions relatively broad and apply detailed restrictions with NTFS. For example, you might grant Authenticated Users Change at the share level, then control department folders with security groups. That design is safe only when the NTFS rules are deliberate and reviewed.

Use groups instead of individual user entries:

icacls "D:\Shares\Accounting" /inheritance:r
icacls "D:\Shares\Accounting" /grant "DOMAIN\Accounting-Read:(OI)(CI)(RX)"
icacls "D:\Shares\Accounting" /grant "DOMAIN\Accounting-Write:(OI)(CI)(M)"
icacls "D:\Shares\Accounting" /grant "DOMAIN\Domain Admins:(OI)(CI)(F)"

(OI) inherits to files, while (CI) inherits to subdirectories. (RX) means read and execute, (M) means modify, and (F) means full control. The /inheritance:r option removes existing inheritance, so check that administrators and required system accounts will retain access before running it.

Auditing can record failed access attempts in the Security log. I do not add audit rules to every folder by default. Too much noise buries the event I actually need.

Use role-based groups. Then test the effective result with a normal user account, not an administrator account that can bypass the question.

Caution

The share permission is not the whole permission model. NTFS can still deny an operation, and a broad share permission can expose more data than intended if the folder ACL is careless.

Keep SMB inside the networks that need it

SMB 3.x includes features such as signing and encryption. SMBv1 is obsolete, and current Windows Server installations should not enable it unless you have identified a specific legacy dependency that cannot yet be removed.

Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol,EnableSMB2Protocol,RequireSecuritySignature,EncryptData

If SMBv1 is enabled, identify the dependent devices before disabling it:

Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart

Test client compatibility first. An old printer or NAS is not a good reason to enable SMBv1 for every share. Update it, replace it, or isolate it on a restricted network.

For encryption on a particular share:

Set-SmbShare -Name 'Accounting' -EncryptData $true
Get-SmbShare -Name 'Accounting' | Select-Object Name,EncryptData

Encryption protects data while it crosses the network. It does not encrypt files at rest on the server. For theft or physical-access scenarios, consider BitLocker and key management separately.

Windows Defender Firewall rules for file sharing should be limited to the profiles and source networks that require them. The main SMB target is TCP 445. Forwarding that port from an internet router puts the file server directly in reach of scanners and attackers.

Keep SMBv1 disabled and TCP 445 private. Those two checks remove a surprising amount of unnecessary exposure.

Connect clients and troubleshoot the right layer

On a Windows client, enter \\FILE-SERVER\Common in File Explorer. For a temporary command-line connection:

net use \\FILE-SERVER\Common /user:DOMAIN\user *

The asterisk prompts for the password without displaying it. To map a persistent drive:

net use Z: \\FILE-SERVER\Common /persistent:yes

In a domain, Group Policy Preferences are easier to manage across many clients. Windows can also retain existing credentials for a server, so connecting to the same host with different accounts may produce a misleading error.

When a connection fails, check name resolution and TCP 445 separately:

Resolve-DnsName FILE-SERVER
Test-NetConnection FILE-SERVER -Port 445
Get-SmbConnection

TcpTestSucceeded : True proves that the port is reachable. It does not prove that the account is authorized. If the port is open but access is denied, inspect the share name, authentication context, group membership, and NTFS permissions.

The troubleshooting method in How to Fix DNS_PROBE_FINISHED_NXDOMAIN Error is useful when the problem is name resolution. For a wider network-layer check, What Is an IP Address and How Does It Work? and What Is ARP? Address Resolution Protocol Explained provide useful background.

Monitor the server and prove that recovery works

A share is not finished when the first user opens it. Watch free disk space, active SMB sessions, open files, copy failures, and failed authentication attempts.

Get-SmbSession | Select-Object ClientComputerName,ClientUserName,NumOpens
Get-SmbOpenFile | Select-Object ClientComputerName,ClientUserName,Path

Do not close a session merely because a file appears locked. Identify the client and user first, then close the application in a controlled way whenever possible.

I learned the backup part during a degraded RAID1 incident. One disk had already failed, and then the remaining disk began making noises that were impossible to ignore. The replacement process was tense because the array was still serving files, but the real comfort came from knowing we had an independent backup and had actually restored from it before. RAID gave us continuity; it did not give us a second copy.

Windows Server Backup, VSS-based backups, a separate backup server, or another suitable backup system can all work. RAID is not a backup. Ransomware and accidental deletion call for a separate offline or immutable copy, plus regular restore tests.

Shadow Copies for Shared Folders can help users recover previous versions quickly, but they are not a replacement for backups. They can disappear with the same disk failure, and their allocated space can fill under heavy write activity.

Set a disk-capacity alert instead of watching Explorer manually. Treating less than 15 percent free space as an early warning can be a reasonable starting point, but the useful threshold depends on workload, volume size, and how quickly the data grows.

Restore something. After each backup job, restore at least one file. Once a month, rehearse a larger restore into a different folder or test environment.

From the field

During a degraded RAID1 incident, I was grateful that the independent backup had been tested before the second disk became unreliable. RAID kept the files available for a while; the restore test gave me confidence that recovery did not depend on the array surviving.

Read the error before changing the firewall

“Network path was not found”

Check the share name and DNS resolution first. If Test-NetConnection FILE-SERVER -Port 445 fails, inspect Windows Defender Firewall, network ACLs, VPN routes, and whether the server is running. If the IP path works but the hostname does not, DNS is the likely cause.

“Access is denied”

Review both SMB and NTFS permissions. If group membership changed recently, sign out and back in or renew Kerberos tickets. Traversal permissions on parent folders can affect the result too.

Credentials are requested repeatedly

Check saved credentials on the client, the domain format, and time synchronization. In Active Directory, clock skew can interfere with Kerberos authentication. Inspect existing connections with net use and remove unnecessary ones before trying another account.

Copy speed is low

Separate disk latency, client and server link speed, antivirus scanning, and the number of small files. One large file may transfer quickly while thousands of small files crawl because of metadata work, disk latency, or the application’s access pattern. Tuning theoretical network numbers will not fix a queue building on the disk.

Example

If a client can reach TCP 445 but receives "Access is denied," stop treating it as a firewall problem. Check the share name, authentication context, group membership, NTFS ACLs, and parent-folder traversal permissions.

Choose SMB for shared work, not public transfer

SMB and FTP solve different problems. SMB suits Windows users who need to open, edit, and lock files on a network share while using NTFS and Active Directory permissions. FTP is designed for transfer; for current deployments, use FTPS with TLS or SFTP over SSH instead of plain FTP.

Criteria SMB FTP/SFTP
Typical use Shared folder on a local network Remote file transfer
Authentication AD or local Windows account Account, TLS, or SSH key
Mapped-drive behavior Supported natively Requires an extra client or layer
Internet exposure Not recommended Can be controlled with SFTP or FTPS

For a one-time file transfer to a remote customer, use SFTP, a secure portal, or a VPN rather than exposing SMB. The guide What Is FTP? File Transfer Protocol Explained covers the basic differences between transfer protocols.

Test it as the person who will use it

Run the first test from a real client, not only from the file server itself. Test reading, creating, modifying, and deleting a file. Then test a folder the account should not reach. Use a standard test account, not your everyday administrator account.

In Event Viewer, review SMB-related entries under Applications and Services Logs and security events under Windows Logs > Security. Decide which events matter before enabling auditing; otherwise useful signals disappear into noise.

Document the share inventory: share name, physical path, owner group, write access, backup policy, retention period, and permitted networks. Months later, the useful question will be “Who can access this folder, and why?”

I now keep that answer next to the restore result. A share that opens is only a share that opens; the finished system is the one whose access and recovery behavior I can demonstrate.

Check These Before Going Live

  • Give the server a static IP address and create the correct DNS record.
  • Confirm the hostname and network profile before creating any shares.
  • Create shares with clear names on a dedicated data volume where appropriate.
  • Assign access through role-based groups and review both SMB and NTFS permissions.
  • Keep SMBv1 disabled and restrict TCP 445 to trusted networks.
  • Test read, write, delete, and denied-access behavior from a standard client account.
  • Restore files from a backup and record the result before calling the backup usable.

Before handing over a new share, connect with a standard user account and test the exact actions that user should be able to perform. A share is not finished when it opens; it is finished when access, logging, backup, and restore behavior are all known.

Explore VPS plans

If you’re running Windows Server on physical rack hardware, I also recommend reading my new data center PDU guide to understand how power is distributed safely and monitored across your equipment.

Frequently Asked Questions

What is required for Windows Server file sharing?

You need a Windows Server installation with the File Server role, a reachable network address, correct DNS, a shared folder, and appropriate SMB and NTFS permissions. In a domain environment, joining the server to Active Directory usually makes authentication and group-based access easier. You also need firewall rules that permit TCP 445 only from trusted networks and a backup plan that has been tested by restoring files.

Should SMBv1 be enabled for older devices?

Usually no. SMBv1 is obsolete and lacks the security expected from current Windows Server deployments. First identify the device that requires it, then update or replace the device, or isolate it on a restricted network segment. Enabling SMBv1 across the file server simply to accommodate one old printer or NAS increases exposure for every share on that server.

What is the difference between share and NTFS permissions?

Share permissions apply when a user connects over SMB, while NTFS permissions apply both locally and over the network. Effective access is limited by the more restrictive result. For example, Change at the share level does not override read-only NTFS permissions. Use groups, document the design, and test with a standard account rather than assuming that an administrator's access represents everyone else's access.

Why can I reach port 445 but not open the share?

A successful TCP 445 test proves only that the network path to the SMB service is available. The share name may be wrong, authentication may use the wrong account or domain, or share and NTFS permissions may deny access. Check Get-SmbShareAccess, the folder ACL, group membership, and existing client credentials before changing firewall rules.

Is RAID a backup for a Windows file server?

No. RAID can keep a server operating after some disk failures, but it does not protect against accidental deletion, ransomware, corruption, or a failure affecting the whole array. Keep separate backup copies, preferably including an offline or immutable copy, and test restoration regularly. Shadow Copies can help recover earlier versions quickly, but they also do not replace independent backups.

Should I expose SMB to the internet for remote users?

Do not forward TCP 445 directly from the internet to a file server. Use a VPN, private network connection, secure portal, SFTP, or another controlled access method instead. SMB is designed primarily for trusted network environments, and internet exposure increases scanning and attack risk. Restrict firewall rules by source network even inside a VPN or private segment.

Sources

Avatar of Defne
Author

Defne