Find Folders Whose Explicit Permissions Broaden Inherited Access

Last updated: November 29, 2026

Quick Overview

Given a file-share tree where each node either inherits its parent's effective ACL or sets an explicit ACL that replaces it, return every non-root node whose explicit ACL grants principals that its parent's effective ACL did not, along with those added principals.

Concentric Ai
Coding & Algorithms
Software Engineer
Concentric Ai
November 29, 2026
Software Engineer
Technical Screen
Coding & Algorithms
Medium

0

0

0 solved


Given a file-share tree where each node either inherits its parent's effective ACL or sets an explicit ACL that replaces it, return every non-root node whose explicit ACL grants principals that its parent's effective ACL did not, along with those added principals.

Broken inheritance is a classic source of oversharing on Windows file shares and SharePoint sites, and Concentric AI surfaces it as a posture risk. The interviewer checks tree traversal that carries state, correct handling of inherit vs override, and avoiding recursion limits on deep paths.

What the Interviewer Expects
  • Carry the parent's effective ACL down the traversal
  • Distinguish inheriting nodes from explicit overrides
  • Report only additions, not narrowing changes
  • Use an iterative traversal for deep trees
  • Discuss memory when many nodes share the same ACL
Key Topics to Cover
Tree traversal
Set difference
Access inheritance
Iterative DFS
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you also detect nodes that narrow access in a way that hides data from auditors?
  • Real NTFS ACLs merge inherited and explicit entries rather than replace; how would the logic change?
  • How would you rank drift findings by risk when 'everyone' and a single contractor both appear?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input rows (path, parent, acl) where acl is a list or None for inherit. A node's effective ACL is its own if explicit, else its parent's. Report (path, added) where `added = explicit - parent_...

High-Level Design

Build a children map, then DFS from roots carrying the parent's effective ACL as a frozenset. Frozensets are immutable, so all inheriting descendants share one object without copying, which matters fo...


Submit Your Answer
Markdown supported

Related Questions