Years of "Everyone" permissions, broken inheritance and organisation-wide sharing links mean most staff can open files they should never see, and AI assistants now search all of it on their behalf. Unstructured data in Windows file servers, SharePoint, OneDrive and Google Drive is where contracts, HR records, credentials in spreadsheets and source exports actually live. Access was granted for convenience and rarely removed, and an assistant that inherits a user's permissions turns that silent oversharing into an answer to a question. This guide explains how access works across on-premises shares and cloud file platforms, the admin and service accounts that matter, how to log and detect misuse, a hardening baseline, and a phased clean-up that does not break the business. It is for infrastructure, Microsoft 365 and data security teams. Governance programme design is in the Data Access Governance Guide; this page is the platform-level detail.
Key takeaways
- Effective access is the intersection of layers. On Windows, a user needs both share and NTFS permission; in SharePoint, site membership, unique item permissions and sharing links all add up. Review the effective result, not one layer.
- Broad groups are the main oversharing cause. Everyone, Authenticated Users, Domain Users and "Everyone except external users" (EEEU) grants make content effectively public internally.
- Hiding is not protecting. Access-based enumeration and Restricted Content Discovery reduce what people stumble across, but neither changes permissions.
- Service accounts and sync tools hold the widest access. Backup, migration, search crawler and AI connector identities often have read on everything and need the tightest control.
- Measure and fix in waves. Start with reports of the broadest access on the most sensitive locations, apply interim restrictions, then remediate with owners.
How identity and access work in file shares
Windows SMB file servers
- Two permission layers: share permissions (managed with Get-SmbShareAccess and Grant-SmbShareAccess) and NTFS ACLs on the file system. The most restrictive combination applies over the network.
- Inheritance: folders inherit ACEs from parents unless inheritance is disabled. Broken inheritance creates islands of unique permissions that nobody reviews, and an Everyone ACE at the root flows to every new subfolder.
- Access-based enumeration (ABE): hides folders a user cannot access (Set-SmbShare -FolderEnumerationMode AccessBased, or on a DFS namespace with dfsutil property abe enable). Microsoft states that ABE does not prevent access if the user already knows the path, and that it can raise server CPU in some environments.
- DFS namespaces: DFS folder permissions only show or hide folders; only share and NTFS permissions on the folder target control access.
SharePoint and OneDrive
- Site-level access: owners, members and visitors groups, often backed by a Microsoft 365 group or Team.
- Sharing links: "Anyone", "People in the organization" and "Specific people" links grant access outside group membership. Organisation-wide links are the cloud equivalent of an Everyone ACE.
- Unique permissions: breaking inheritance on a library, folder or file creates the same review problem as on NTFS.
- EEEU: the built-in "Everyone except external users" claim gives every internal account access.
Google Drive
Admins control whether files can be shared outside the organisation, can allow external sharing only with certain domains, warn users before external sharing and block link sharing, and set general access defaults; group settings override organisational unit settings.
| Concept | Windows file server | SharePoint / OneDrive | Google Drive |
|---|---|---|---|
| Broad internal grant | Everyone, Authenticated Users, Domain Users ACE | EEEU, "People in the organization" links | General access set to the organisation |
| Anonymous or external access | Guest access, null sessions (legacy) | "Anyone" links, guest users | "Anyone with the link", external sharing |
| Hide without changing access | Access-based enumeration | Restricted Content Discovery | Not equivalent |
| Inventory report | ACL scan tools, PowerShell (Get-Acl) | Data access governance reports | Admin console sharing reports and audit log |
| Access event | Event 5145 (Audit Detailed File Share), 4663 (Audit File System) | Unified audit log file and sharing events | Drive audit log |
Admin roles and privileged access
- File server administrators: local Administrators and Backup Operators on a file server can read everything regardless of ACLs (backup privilege bypasses file permissions). Keep membership small, use separate admin accounts and a privileged access workstation.
- Take ownership and WRITE_DAC: anyone with these rights can grant themselves access. Audit who holds them on sensitive roots.
- SharePoint administrators and site collection admins: can add themselves to any site. Use just-in-time role activation for SharePoint Administrator and Global Administrator.
- Delegation of Restricted Content Discovery: by default only SharePoint administrators manage it; Set-SPOTenant -DelegateRestrictedContentDiscoverabilityManagement $true lets site admins manage their own sites. Decide this deliberately.
- Google Workspace super admins and Drive admins: can change sharing policy tenant-wide; restrict and alert on changes.
See the SharePoint and OneDrive Security Guide for tenant-level admin hardening.
Integrations, API tokens and service accounts
The identities with the broadest file access are usually not people.
| Non-human identity | Typical access | Control |
|---|---|---|
| Backup and replication service accounts | Read on every share; backup privilege | Dedicated account, deny interactive logon, vault the password or use a managed service account, monitor logons outside the backup window |
| Migration and sync tools | Tenant-wide Sites.FullControl.All or Files.ReadWrite.All app permissions | Time-bound consent, remove after migration, prefer Sites.Selected scoped to named sites |
| Search crawlers and indexers | Read on every indexed location | Index only approved locations; check the index honours ACLs |
| AI assistants and connectors | Whatever the user or connector identity can read | Fix oversharing first; label sensitive content; restrict discovery for unreviewed sites |
| DLP, classification and eDiscovery scanners | Read on all content | Restrict to security tooling owners, log every query |
| Applications writing to shares | Modify on a drop folder, often granted at a parent | Grant on the specific folder only; no Full Control |
The EchoLeak Copilot vulnerability showed why this matters: a crafted email could make the assistant pull in whatever the targeted user could reach, so overshared SharePoint and OneDrive content widened what an attacker could extract. See the Microsoft 365 Copilot Security Deep Dive.
Logging and detection
- Event 5145 (Audit Detailed File Share): logged every time a network share object is accessed, with the account, source address, share name, relative target, access mask and the ACE that granted or denied access. Microsoft notes failures are logged only for share-level denials, not NTFS denials, and recommends filtering to specific shares and to high-risk rights.
- Event 4663 (Audit File System): records that an access right was used, with process name. It is generated only where the object's SACL has a matching ACE, so enabling the subcategory alone logs nothing useful: set SACLs on sensitive folders.
- Rights worth alerting on: WriteData/AddFile, AppendData, WriteEA, DeleteChild, WriteAttributes, DELETE, WRITE_DAC and WRITE_OWNER, the set Microsoft recommends monitoring for file objects.
- SMB audit settings: the Lanman Server policies "Audit client does not support signing" and "Audit client does not support encryption" find legacy clients before you enforce signing or encryption.
- Cloud audit: Microsoft 365 unified audit log sharing events (link creation, access by guests) and the Google Drive audit log.
| Behaviour | ATT&CK technique | Signal |
|---|---|---|
| Enumerating shares across many servers | T1135 Network Share Discovery | One account touching many servers' IPC$ or share lists in a short window |
| Bulk reads from file servers | T1039 Data from Network Shared Drive | 5145 volume per account far above its baseline |
| Bulk SharePoint downloads | T1213.002 Sharepoint | FileDownloaded or sync spikes for one user or app |
| Cloud storage harvesting | T1530 Data from Cloud Storage | App permission use outside expected sites |
| Mass modification or renames | T1486 Data Encrypted for Impact | High rate of WriteData and DELETE across folders |
Metrics:
- Number of sites, shares and folders granting access to Everyone, Domain Users or EEEU (trend to zero on sensitive locations).
- Count of active "Anyone" and organisation-wide links, from the sharing links activity report.
- Percentage of sensitive locations with a named owner who completed an access review this quarter.
- Number of service principals with tenant-wide file permissions.
- Percentage of sensitive folders with SACLs and events reaching the SIEM.
Hardening baseline
Windows file servers
- Share permissions: grant Authenticated Users Change (or Read) at the share and control access through NTFS groups, or set exact groups on both; never Everyone Full Control.
- Group-based ACLs: one access group per resource and permission level (for example FS-Finance-Read, FS-Finance-Modify), owned by the data owner, no direct user ACEs.
- Signing and encryption: require SMB signing through "Microsoft network server: Digitally sign communications (always)" and the client equivalent (registry value RequireSecuritySignature = 1). Turn on SMB encryption per share with Set-SmbShare -EncryptData $true for sensitive shares; RejectUnencryptedAccess defaults to true. See the SMB Signing Guide.
- Remove SMB1: Set-SmbServerConfiguration -EnableSMB1Protocol $false and remove the feature.
- Data at rest: SMB encryption covers transit only; use BitLocker for volumes.
- ABE on user-facing shares to reduce discovery, while remembering it is not a control on access.
Microsoft 365
- Default link type: set the default sharing link to "Specific people" and restrict or disable "Anyone" links.
- Run the data access governance reports: "Site permissions for your organization" as the oversharing baseline (Microsoft suggests snapshot reports quarterly and activity reports monthly), plus the sharing links and EEEU activity reports. Full reports need SharePoint Advanced Management.
- Restricted Content Discovery (Set-SPOSite -RestrictContentOrgWideSearch $true) as an interim step for high-risk sites: it removes the site from organisation-wide search and tenant-wide Copilot responses without changing permissions. Changes can take over a week to apply on sites with more than 500,000 items, and it does not apply to OneDrive.
- Sensitivity labels with encryption on the most sensitive content so access needs label rights as well as file permission.
Google Workspace
- Restrict external sharing to allowlisted domains where possible, turn on warnings for external sharing, and set general access defaults to restricted.
Phased clean-up and decision guidance
- Baseline: scan file server ACLs and run cloud reports; list locations with broad grants, unique permissions and external links.
- Classify and prioritise: rank by sensitivity (HR, finance, legal, credentials) multiplied by breadth of access. See the Data Classification Guide.
- Interim restriction: for the top tier, apply Restricted Content Discovery or remove the broad group and add the owning team, before any AI assistant rollout.
- Pilot remediation: on one department, replace broad grants with access groups, monitor 5145 and help desk tickets for two weeks. Rollback is re-adding the previous ACE, so export ACLs (icacls /save) before changes.
- Scale with owners: assign each top-level folder and site an owner, run access reviews, and remove stale and orphaned access.
- Prevent regression: default links to "Specific people", block new Everyone ACEs through change control, and re-run reports on a schedule.
Choosing an approach: where a share has thousands of files and unclear ownership, archive and lock it read-only rather than remediating item by item. Where a site is active and business-critical, restrict discovery first and remediate with the owner. Small organisations can usually use native reports and PowerShell; large estates with many file servers and tenants generally need a data access governance tool that computes effective permissions across platforms.
| Control area | NIST SP 800-53 Rev 5 | NIST CSF 2.0 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|
| Least privilege on shares and sites | AC-3, AC-6 | PR.AA-05 | A.5.15 Access control, A.8.3 Information access restriction |
| Owner reviews and account hygiene | AC-2 | PR.AA-05 | A.5.18 Access rights |
| Data inventory and classification | RA-2 | ID.AM-07 | A.5.12 Classification of information |
| File access logging | AU-2, AU-12 | DE.CM-03 | A.8.15 Logging |
Common misconfigurations
- Everyone Full Control at a share root with inheritance flowing to every new folder.
- Relying on ABE or Restricted Content Discovery as the fix: both hide content; users who know the path or URL still get in.
- Direct user ACEs and broken inheritance left from old projects, so leavers' access survives in groups and on individual folders.
- Organisation-wide links as the default in SharePoint and OneDrive, producing thousands of links nobody tracks.
- Migration apps never removed: tenant-wide file permissions granted for a one-off migration stay active for years.
- Orphaned SIDs and stale data: ACEs that show only a SID belong to deleted accounts or groups from old domains, and folders untouched for years still hold sensitive files. Remove dead ACEs, and archive or delete stale content under the retention schedule instead of reviewing permissions on data nobody needs.
- Auditing enabled without SACLs: Audit File System is on, but no SACLs exist, so 4663 never fires for sensitive data.
Practitioner checklist
- Run an ACL scan of every file server and the SharePoint "Site permissions for your organization" report.
- Remove Everyone, Domain Users and EEEU grants from sensitive locations; use owner-managed access groups.
- Set the default sharing link to "Specific people" and restrict "Anyone" links.
- Apply Restricted Content Discovery to unreviewed high-risk sites before AI assistant rollout.
- Require SMB signing, enable SMB encryption on sensitive shares and remove SMB1.
- Inventory backup, migration, crawler and AI connector identities; scope them and remove unused tenant-wide permissions.
- Configure SACLs and Audit Detailed File Share on sensitive shares; forward 5145 and 4663 to the SIEM with filtering.
- Name an owner for every top-level share and site and run quarterly access reviews.
- Export ACLs before changes so remediation can be rolled back.
Standards and references
- Microsoft Learn: Data access governance reports
- Microsoft Learn: Restricted Content Discovery
- Microsoft Learn: Event 5145, a network share object was checked
- Microsoft Learn: Event 4663, an attempt was made to access an object
- Microsoft Learn: SMB security enhancements
- Microsoft Learn: SMB signing overview
- Microsoft Learn: Enable access-based enumeration on a namespace
- Google Workspace: Manage external sharing for your organisation
Related NHI Mgmt Group resources: Data Access Governance Guide · SharePoint and OneDrive Security Guide · Microsoft 365 Copilot Security Deep Dive · SMB Signing Guide