What is a file server?
A file server keeps shared documents, department folders and user home folders in one place instead of scattered across individual PCs. Clients open the files across the network as if they were local. The role can run on Windows Server, on Linux with Samba or NFS, on a NAS appliance, or on a Windows desktop sharing a folder in a small office. CompTIA calls the role fileshare in its list of server roles.
Protocols and ports
| Protocol | Port | Used by |
|---|---|---|
| SMB (Server Message Block); CIFS is an older SMB dialect | TCP 445 | Windows file and printer sharing; also macOS and Linux (Samba) |
| NetBIOS over TCP/IP (NetBT) | 137-139 | Name and session services for legacy SMB clients |
| NFS (Network File System) | 2049 | Linux and Unix file sharing |
SMBv1 is obsolete and was exploited by the WannaCry ransomware in 2017, so current Windows versions leave it off. Modern clients use SMB 2 and SMB 3, and SMB 3 supports encryption.
Accessing shares
- UNC path:
\\server\shareor\\192.168.1.20\sharein File Explorer or the Run box. - Mapped drive: Map network drive in File Explorer, or
net use Z: \\server\share /persistent:yesat a command prompt. - Hidden shares: a share name ending in
$does not appear when users browse the server. Windows creates administrative shares such asC$andADMIN$. - Linux and macOS: mount SMB shares (for example with
mount -t cifson Linux) or NFS exports.
Permissions
A Windows share has two permission layers. Share permissions (Full Control, Change, Read) apply only to access over the network. NTFS permissions apply both locally and over the network. When a user connects through a share, the effective permission is the more restrictive of the two. A common practice is to give Authenticated Users broad share permissions and control access with NTFS permissions on folders, assigned to groups rather than individual users.
Running a file server well
- Back up the shared data. RAID protects against a failed drive, not against deletion or ransomware.
- Turn on Previous Versions (Volume Shadow Copy) so users can restore earlier copies of their own files.
- Remember that ransomware on one client can encrypt every share that user can write to through mapped drives, so limit write access to what people need.
- Use quotas or storage reports to keep one department from filling the volume.
Troubleshooting cues
- You cannot reach
\\serverbut\\IP-addressworks: a name resolution (DNS) problem. - Neither works: check connectivity with
ping, the server's firewall rule for File and Printer Sharing (TCP 445), and whether the sharing computer's network is set to the Public profile, which blocks file sharing by default. - "Access is denied": check both the share and NTFS permissions and which credentials the client is using.
- A mapped drive shows a red X: the connection dropped or the stored credentials changed. Reconnect it, or remove and remap it with
net use.
File server on the CompTIA A+ exam
Core 1 objective 2.3 lists fileshare among the server roles, and objective 2.1 lists port 445 for SMB/CIFS and ports 137-139 for NetBIOS/NetBT. Know which protocol and port a Windows file share uses, how a NAS differs from a general-purpose server (it is a dedicated storage appliance), and what a UNC path looks like. Core 2 adds share versus NTFS permissions, mapping drives with net use and administrative shares. If a question describes users opening shared folders by \\name\share, think file server and SMB on TCP 445.