deepseek-ai/deepseek-harness · error · Error
SetFileSecurityW ${code} (Win32 ${win32Code}): ${path}
Error message
SetFileSecurityW ${code} (Win32 ${win32Code}): ${path} What it means
Error "SetFileSecurityW ${code} (Win32 ${win32Code}): ${path}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/fs/fs-local/src/win32.ts:113
const descriptor = Buffer.alloc(needed[0])
if (api.getFileSecurityW(nativePath, DACL_SECURITY_INFORMATION, descriptor, descriptor.length, needed) === 0) {
throw win32Error('GetFileSecurityW', api.getLastError(), path)
}
return descriptor.subarray(0, needed[0])
}
/**
* Copy an existing file's DACL onto another file and protect it from staging-parent inheritance.
* The destination must still be empty when confidentiality depends on this call.
* @param source - existing file whose DACL is copied.
* @param destination - existing file that receives the protected DACL.
*/
export async function copyFileDaclWin32(source: string, destination: string): Promise<void> {
const descriptor = await readFileDaclWin32(source)
const api = await win32()
const information = (DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION) >>> 0
if (api.setFileSecurityW(toNamespacedPath(destination), information, descriptor) === 0) {
throw win32Error('SetFileSecurityW', api.getLastError(), destination)
}
}
/**
* Replace a Windows file while preserving the replaced file's ACL and other replace metadata.
* @param replaced - existing destination file.
* @param replacement - closed staging file on the same volume.
*/
export async function replaceFileWin32(replaced: string, replacement: string): Promise<void> {
const api = await win32()
if (api.replaceFileW(
toNamespacedPath(replaced),
toNamespacedPath(replacement),
null,
0,
null,
null,
) === 0) {View on GitHub (pinned to b150a551b8)
Solutions
- Run elevated or adjust the file DACL; check the Win32 error code for access denied or an invalid descriptor.
When it happens
Trigger: Thrown at packages/fs/fs-local/src/win32.ts:113 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/a14385300de65f3f.
Report an issue: GitHub.