Sub topic 8
NTFS permissions versus share permissions
This chapter assumes you can create local users and groups in Windows, open a folder's Properties dialog, and use an elevated command prompt. It builds on the earlier chapter on user accounts and groups. You will learn how the two permission systems work, how they combine, and which mistakes cause most exam questions and real tickets.
Two layers, two jobs
Windows controls access to files with two separate permission systems.
- NTFS permissions are stored on the file or folder itself, in the NTFS file system. They apply no matter how someone reaches the data: at the keyboard, through Remote Desktop, or over the network.
- Share permissions are set on a shared folder. They apply only when someone connects over the network, for example to
\\FS01\Finance. They do nothing for a user who is signed in at the machine.
Share permissions are coarse. NTFS permissions are fine-grained. Both are checked on a network connection, and the more restrictive result wins.
| Feature | NTFS permissions | Share permissions |
|---|---|---|
| Where they apply | Local and network access | Network access only |
| File system needed | NTFS | NTFS, FAT32, or exFAT |
| Applied to | Files and folders | Shared folders only |
| Levels | Full Control, Modify, Read & Execute, List Folder Contents, Read, Write, Special | Full Control, Change, Read |
| Inheritance | Yes, flows to subfolders and files | No, applies to the whole share |
| Set from | Security tab | Sharing tab, Advanced Sharing, Permissions |
FAT32 and exFAT have no NTFS permissions. A share on a FAT32 USB drive is protected only by its share permissions, and anyone who plugs the drive in locally can read everything on it.
The NTFS permission levels
Each level is a bundle of lower-level special permissions.
| Permission | What it allows |
|---|---|
| Read | View file contents and folder listings, and see attributes and permissions |
| Write | Create files and folders, and change attributes |
| List Folder Contents | See names of items in a folder (folders only) |
| Read & Execute | Read, plus run programs |
| Modify | Read & Execute, Write, and delete the object |
| Full Control | Everything in Modify, plus change permissions and take ownership |
Full Control matters because it includes the right to change permissions. A user with Modify can change files but cannot grant access to other people. Give Full Control sparingly.
The three share permission levels work like this: Read allows viewing and running files. Change adds creating, editing, and deleting. Full Control adds changing NTFS permissions on NTFS volumes.
How permissions combine
Four rules explain nearly every scenario.
- Allow permissions accumulate across groups. If a user is in Sales (Read) and Managers (Write), the user gets Read and Write.
- Deny overrides Allow. An explicit Deny wins over any Allow, even from another group.
- Share and NTFS are both evaluated over the network. The effective access is the more restrictive of the two results.
- Local access ignores share permissions. Only NTFS applies.
Here is a worked example. A user is in the Accounting group. The share \\FS01\Finance grants Accounting Read. The NTFS permissions on the folder grant Accounting Modify.
- Over the network, the share allows Read and NTFS allows Modify. The more restrictive result is Read, so the user can only read.
- Signed in at the server console, only NTFS applies. The user gets Modify.
The reverse case gives the same lesson. If the share grants Everyone Full Control and NTFS grants Accounting Read, network users get Read. Many administrators set the share to Full Control for Authenticated Users and let NTFS do the real work, because one set of rules is easier to maintain.
Inheritance, copying, and moving
NTFS permissions flow down from a parent folder to the files and subfolders inside it. This is inheritance. A new file in C:\Finance receives the permissions of C:\Finance automatically.
You can break inheritance on a child object. In Advanced Security Settings, choose Disable inheritance, then either convert the inherited entries into explicit ones or remove them. This is useful for a confidential subfolder, but each exception makes the tree harder to audit.
What happens to permissions when you copy or move an item is a favorite exam topic.
| Action | Same NTFS volume | Different NTFS volume |
|---|---|---|
| Copy | Takes the destination folder's permissions | Takes the destination folder's permissions |
| Move | Keeps its original permissions | Takes the destination folder's permissions |
A move within one volume only changes where the file is listed, so its permissions travel with it. A move between volumes is really a copy followed by a delete, so the file inherits from the new parent. Moving or copying to a FAT32 or exFAT volume strips NTFS permissions entirely.
Applying least privilege with icacls
The icacls command sets NTFS permissions from an elevated command prompt. This command grants the Accounting group Modify on the Finance folder:
icacls "C:\Finance" /grant "Accounting:(OI)(CI)M"(OI)is object inherit, so files in the folder get the permission.(CI)is container inherit, so subfolders get it.Mmeans Modify. Other codes areFfor Full Control,RXfor Read & Execute,Rfor Read, andWfor Write.
Run icacls "C:\Finance" with no switches to list the current entries. Use /remove to delete a group's entries and /deny to add a Deny. Prefer removing access to adding Deny rules, because Deny entries are easy to forget and hard to troubleshoot.
Assign permissions to groups, not individual users. When a person changes jobs, you move them between groups and the folder permissions stay clean. This is the usual pattern: users go into groups, and groups receive permissions.
Creating and testing a share
You can share a folder from File Explorer: right-click the folder, choose Properties, then Sharing, then Advanced Sharing. Tick Share this folder, give it a share name, and use Permissions to set share-level access.
Appending a dollar sign to the share name, such as Finance$, makes a hidden share. It does not appear when users browse the server, but anyone who types the path can still attempt to connect, so NTFS permissions must still protect it. Windows also creates administrative shares automatically, such as C$ and ADMIN$. These give administrators remote access to the whole drive and the Windows folder.
Two checks help when you troubleshoot:
- On the Security tab, choose Advanced, then the Effective Access tab. It calculates a chosen user's resulting NTFS permissions, including group memberships.
- After you change a user's group membership, the user must sign out and back in. Group membership is read into the access token at sign-in, so existing sessions keep the old rights.
Ownership and common errors
Every file has an owner, and the owner can always change its permissions. If an administrator is locked out of a folder, they can take ownership from Advanced Security Settings and then grant themselves access. Administrators can take ownership even without an existing permission, which is why access to the Administrators group deserves protection.
Common problems and their causes:
- User can read at the server but not over the network. The share permission is too restrictive. Check the Sharing tab.
- User can open the share but not a subfolder. Inheritance was broken or a Deny entry exists on the subfolder. Check Effective Access.
- A moved file is not accessible to the expected group. The move crossed volumes, so the file took the destination permissions.
- Permissions were changed but the user still cannot connect. The user has not signed out and in, so the token is stale.
- Access works for everyone, including guests. Check whether Everyone has been granted access at both layers and whether the Guest account is enabled. Disable it with
net user guest /active:no.
Exam-style scenarios
- A user needs to edit files but must not delete them. Use the Write permission or special permissions instead of Modify, since Modify includes delete.
- A team folder must be available only to its members, including at the console. Use NTFS permissions, because share permissions do not cover local access.
- A shared folder on a FAT32 flash drive must be restricted. NTFS permissions are unavailable, so use share permissions, or convert the drive to NTFS.
- A user is in two groups, one with Allow Write and one with Deny Write. The Deny wins, and the user cannot write.
Exercise
The share \\FS01\Projects grants the Designers group Change. The NTFS permissions on the Projects folder grant Designers Read. A designer connects over the network and tries to save a file. What happens, and what would the same designer be able to do when signed in locally at FS01?
Show answer
Over the network the save fails. Both layers apply and the more restrictive one, NTFS Read, wins. Signed in locally, only NTFS applies, so the designer still gets Read and cannot save there either. To let designers edit files, raise the NTFS permission to Modify (or Write), and keep the share at Change or higher.
Exercise
You move Budget.xlsx from D:\Staff to E:\Archive. Both are separate NTFS volumes. Which permissions does the file have afterward? What changes if E: is formatted as exFAT?
Show answer
Moving between different volumes copies the file and deletes the original, so the file takes the permissions of E:\Archive. If E: is exFAT, NTFS permissions cannot be stored, so the file has no NTFS permissions at all and is protected only by any share permissions.