You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
一句话
Windows 沙箱(windows-acl 后端,workspace-write)下,
os.mkdir(path, 0o700)(以及硬编码 0o700 的tempfile.mkdtemp/TemporaryDirectory)创建出的目录 DACL 为空(拒绝一切),创建者自己都写不进——uv 源码构建、pytest 等一切经 mkdtemp 的 Python 工具在沙箱内必失败。环境
sandbox-windows-acl后端)复现(沙箱内任意位置:工作区根、深层子目录、私有临时目录都复现)
判别实验(同一进程、同一父目录,稳定复现)
os.mkdir(d)(无 mode)os.mkdir(d, 0o777)/0o600/0o200/0o100os.mkdir(d, 0o700)icacls读 DACL 都报 "Access is denied",创建者自己写不进、删不掉tempfile.mkdtemp(...)/TemporaryDirectory(...)影响
uv sync构建 sdist 时 setuptools 经tempfile.mkdtemp建临时目录 → 必挂。这常常被误判为「缓存/网络被拦」(.tmp-前缀、UV_CACHE_DIR 等表象),实际根因在这里。推测方向(供排查)
受限令牌由
CreateRestrictedToken(DISABLE_MAX_PRIVILEGE | LUA_TOKEN | WRITE_RESTRICTED, ...)创建。怀疑LUA_TOKEN使令牌默认 DACL 异常,与 CPython 显式 mode 的创建路径交互后产生空 DACL(0o777 等其它值正常,唯独 0o700 失败,行为与值强相关)。建议实验:
LUA_TOKEN(保留DISABLE_MAX_PRIVILEGE | WRITE_RESTRICTED+ restricting SIDs),验证 mkdtemp 是否恢复;setTokenDefaultDaclGrant的默认 DACL 合并逻辑。两个方向都可在
sandbox-windows-acl加回归测试(现成的探针脚本可直接转成测试用例)。All reactions