Do not modify the operational directory further: the documented unprotect operation has already returned success without clearing SE_SACL_PROTECTED, and Windows does not provide a documented guarantee that enabling SACL inheritance will preserve the target SACL and every descendant byte-for-byte.
Documented API contract
UNPROTECTED_SACL_SECURITY_INFORMATION means that the SACL inherits ACEs from its parent and requires ACCESS_SYSTEM_SECURITY; PROTECTED_SACL_SECURITY_INFORMATION means that it cannot inherit ACEs. SYSTEM_RESOURCE_ATTRIBUTE_ACE entries are represented by ATTRIBUTE_SECURITY_INFORMATION, while mandatory labels use LABEL_SECURITY_INFORMATION.^1^
The public documentation does not state that clearing SACL protection requires this combination:
SACL_SECURITY_INFORMATION |
UNPROTECTED_SACL_SECURITY_INFORMATION
nor does it state that a non-null pSacl is required merely to request the protection-state transition. SetSecurityInfo permits pSacl == NULL when the SACL itself is not being set.^2^
Therefore, your call was consistent with the documented meaning of UNPROTECTED_SACL_SECURITY_INFORMATION. ERROR_SUCCESS only establishes that the API accepted and completed the request; because the control bit remained set, it did not accomplish the required transition on that fixture.
Controlled name-based experiment
SetNamedSecurityInfoW is the documented name-based equivalent for NTFS objects and accepts SECURITY_INFORMATION flags.^3^ Public documentation says that some flags operate only with SetNamedSecurityInfo, but it does not identify UNPROTECTED_SACL_SECURITY_INFORMATION as one of them.^1^
Consequently, treat this as a diagnostic experiment, not a proven workaround:
DWORD rc = SetNamedSecurityInfoW(
path, SE_FILE_OBJECT,
UNPROTECTED_SACL_SECURITY_INFORMATION,
nullptr, nullptr, nullptr, nullptr);
wprintf(L"SetNamedSecurityInfoW: %lu\n", rc);
PSECURITY_DESCRIPTOR sd = nullptr;
DWORD qr = GetNamedSecurityInfoW(
path, SE_FILE_OBJECT, SACL_SECURITY_INFORMATION,
nullptr, nullptr, nullptr, nullptr, &sd);
// Call GetSecurityDescriptorControl(sd, &control, &revision)
// and test (control & SE_SACL_PROTECTED).
Build as Unicode against Advapi32.lib, and run only in a disposable, production-equivalent fixture using the existing code path that enables SeSecurityPrivilege. Reading a SACL requires opening/querying with ACCESS_SYSTEM_SECURITY; Microsoft documents enabling SE_SECURITY_NAME for that operation.^4^
Perform these checks:
- Capture the complete native security descriptor before the call—not only PowerShell audit rules or SDDL.
- Call
SetNamedSecurityInfoWwith onlyUNPROTECTED_SACL_SECURITY_INFORMATION. - Re-read the descriptor through an independent native process.
- Compare:
-
SE_SACL_PROTECTED; - raw target descriptor and each SACL ACE;
- parent descriptor;
- descendant descriptors.
-
- If the flag again remains set, stop; switching APIs has not resolved the behavior.
- If it clears, repeat on multiple newly created production-equivalent fixtures before considering the operational object.
Do not add SACL_SECURITY_INFORMATION with a non-null pSacl merely as an experiment on the operational directory. That changes the request from altering protection metadata to setting SACL content, increasing the possibility of reconstruction, normalization, or propagation.
Preservation and propagation limits
Resource-attribute and scoped-policy ACEs are special: the inheritance documentation expressly excludes SYSTEM_RESOURCE_ATTRIBUTE_ACE and SYSTEM_SCOPED_POLICY_ID_ACE from the normal ability to block inheritance through SE_SACL_PROTECTED.^5^ PowerShell’s conventional audit-rule collection is therefore not an adequate backup or equality check for the complete SACL.
SetSecurityInfo and SetNamedSecurityInfo can automatically propagate inheritable SACL elements to existing children. The system may impose the current inheritance model on objects below the target and set auto-inheritance control bits.^6^ The API documentation also warns that propagation depends on child share access and handle-open semantics.^2^
Accordingly:
- A successful return does not prove byte-for-byte preservation.
- Enabling inheritance can recalculate the target’s inherited SACL state.
- Existing descendants can potentially change.
- A guarantee that only one control bit changes, while all target and descendant bytes remain identical, is incompatible with the documented inheritance behavior.
Avoid TreeSetNamedSecurityInfo and TreeResetNamedSecurityInfo; those APIs are explicitly intended to reset subtree security and are unsuitable for the stated preservation requirement.
Escalation
Because the handle-based documented request is a reproducible successful no-op on build 26300, open a Microsoft Support case for Windows/Win32 security before changing the operational directory. If build 26300 is from a Windows Insider channel, also submit the reproducer through Feedback Hub.
Include:
- exact build, edition, servicing/Insider channel, and NTFS volume details;
- minimal native reproducer;
- numeric
SecurityInfomask and requested handle access; - token privilege state showing
SeSecurityPrivilegeenabled; - raw before/after security descriptors and control values;
- parent and descendant comparisons;
- the synthetic
SYSTEM_RESOURCE_ATTRIBUTE_ACEbytes and flags; - Process Monitor or equivalent filesystem/security-operation trace;
- confirmation that both
SetSecurityInfoand, if tested,SetNamedSecurityInfoWreturnedERROR_SUCCESSwithout clearing the bit.
Request confirmation of whether this is expected NTFS behavior for resource-attribute-bearing descriptors or a build-specific defect, and request a supported sequence that explicitly addresses propagation and preservation.
References