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
{{ message }}
Repository navigation
On Windows the daemon warns at every start that its data directory is open to other users (mode 666) #1665
On Windows the daemon logs this warning at every start, for a folder only its user can read:
{"level":"warn","module":"daemon","message":"data directory D:\\sv\\home is accessible to other users (mode 666); run chmod 700 D:\\sv\\home"}
Seen on Windows 11 23H2, Node 22.23.5, main at c9d82e3, with a fresh SIMLOCK_HOME the daemon created itself.
Why
The check (src/daemon/connection-host.ts:58) reads the folder's POSIX mode bits. Node on Windows makes up those bits from the read-only attribute (0o666, or 0o444), so they say nothing about who can open the folder; access is the folder's ACL. chmod 700, the fix the message names, is not a Windows command and changes nothing there.
Expected
No mode warning on Windows, or one that reads the ACL and names a Windows fix. The same goes for any other owner-only check that reads mode bits (e.g. connection-host's directory mode, which src/daemon/connection-host.test.ts checks as 448 and gets 438 on Windows).
Confirmed on Windows 11 at 57f6382 with a fresh SIMLOCK_HOME=D:\sv\bug1665-triage. One correction: that folder is not owner-only. It inherits Authenticated Users:(M) from D:\. The default home under C:\Users\<user> is owner-only, and Node still reports 666 for it.
daemon.log: "data directory D:\\sv\\bug1665-triage is accessible to other users (mode 666); run chmod 700 D:\\sv\\bug1665-triage"
icacls D:\sv\bug1665-triage: NT AUTHORITY\Authenticated Users:(I)(M), BUILTIN\Users:(I)(RX)
icacls C:\Users\Szymon: SYSTEM, Administrators, Szymon only; node statSync mode: 666
Test on bug/1665-repro: src/daemon/connection-host.test.ts, "warns on macOS and Linux when group or others can reach the folder, and never on Windows, whose mode bits Node makes up".
pnpm exec vitest run --project unit src/daemon/connection-host.test.ts
- undefined,
+ "data directory /home/0 is accessible to other users (mode 666); run chmod 700 /home/0",
Root cause
Defect. src/daemon/connection-host.ts:55-56 (prepareDataDirectory, called from src/daemon/main.ts:232) warns on any group/other bit. On Windows Node makes up those bits (0o666 or 0o444), so every start warns, whatever the ACL says. src/core/device-root.ts:174-176 already skips the same check on Windows for this reason.
Simplest fix
Add a platform parameter. Return undefined on win32. Pass process.platform from main.ts. Scope running-the-daemon.mdx:149 to macOS and Linux; the Windows aside below it already covers Windows. Mark the endpoint-directory test (connection-host.test.ts:38, 448 vs 438) it.skipIf(process.platform === "win32"), like ipc.test.ts:111.
pnpm exec vitest run --project unit src/daemon/connection-host.test.ts src/daemon/main.test.ts
Tests 29 passed (29)
Alternatives rejected
Read the ACL with icacls and name an icacls fix: it adds a child process at every start. ADR 0003 (2026-10-30 amendment) supports Windows on single-user machines only.
Drop the check everywhere: it would lose a real warning on macOS and Linux.
Risk
On Windows, D:\ folders stay open to other accounts with no warning. The ADR accepts this for single-user machines.
The skipIf was not run on Windows.
Fast track
Defect: yes
Fix tried: yes
Nothing public added or broken: yes
No ADR or rule changed: yes
One fix: no — an ACL check would warn on D:\ folders like the reporter's
Read the folder's real Windows permissions instead of skipping the check: on Windows the daemon warns only when an account other than the user (and SYSTEM / Administrators) can read or change the data directory, and the warning names a Windows fix (an icacls command), not chmod 700. A folder on another drive such as D:\, which grants Authenticated Users modify by default, should warn; the default home under C:\Users\<user> should not. A failed or unreadable ACL check gives no warning and never fails the start. macOS and Linux keep today's mode check. The website sentence in running-the-daemon.mdx follows the new behaviour.
This supersedes the "skip on Windows" proposal in the triage report; please triage again with this shape.
src/daemon/connection-host.test.ts, "on Windows warns from the folder's ACL only when another account can read or change it, names an icacls fix, and warns nothing when the ACL cannot be read; macOS and Linux keep the mode check" (branch bug/1665-repro, 67f155b). It replaces the skip-on-Windows test; its ACLs are what Get-Acl returned on Windows 11:
pnpm exec vitest run --project unit src/daemon/connection-host.test.ts
- undefined,
+ "data directory /home/default-home is accessible to other users (mode 666); run chmod 700 /home/default-home",
D:\dev\<new>: Administrators F, SYSTEM F, Authenticated Users M, Users RX (all inherited from D:\)
C:\Users\Szymon: SYSTEM F, Administrators F, Szymon F, one app capability SID (S,X): traverse only
node statSync mode: 666 for both
Root cause
Defect. src/daemon/connection-host.ts:55-58 (prepareDataDirectory, called from src/daemon/main.ts:232) checks mode bits everywhere; on Windows Node makes them up (0o666), so every start warns and names chmod 700.
Simplest fix
New port src/ports/directory-access.ts: DirectoryAccessReader.read(path) runs PowerShell (10 s timeout), returning { user, entries: [{ sid, name, allow, rights }] }. SIDs, since names are localized.
prepareDataDirectory(filesystem, path, { platform, directoryAccess }): on win32, warn when an allow entry for a SID other than the user, SYSTEM, Administrators or CREATOR OWNER has a read or change right. A read that throws gives undefined.
Pinned message: ... accessible to other users (<names>); run icacls "<path>" /inheritance:r /grant:r "*<user>:(OI)(CI)F" "*S-1-5-18:(OI)(CI)F" "*S-1-5-32-544:(OI)(CI)F". Run in cmd.exe and PowerShell, it left the folder and its files owner-only; unquoted, PowerShell fails on (OI).
running-the-daemon.mdx:149: "... with the command that fixes it: chmod 700 on macOS and Linux, icacls on Windows."
src/core/device-root.ts:174 stays: device roots sit in the data directory by default, which this check covers, and that check refuses a platform, so an ACL check there would turn off the drivers for a D:\ home.
Done: PR #1674 built to the maintainer's decision (the daemon reads the folder's Windows ACL, warns only when another account can read or change it, names an icacls fix, and warns nothing when the read fails; macOS and Linux unchanged; website sentence updated). The review passed in round 1, round 2 and the fix-check, and R1–R3 are fixed. Checked on Windows 11: a C:\Users home gives no warning, a D:\ home warns, and after the printed icacls command a restart gives no warning. The PR is ready.
Not done: merge.
Findings: none open. src/core/device-root.ts stays as it is (see triage report).
Blocked on: fast-track: #1665 held: PR #1674 changes 347 lines, over 250. The maintainer merges the PR, or removes fast-track.
Activity
V3RON commentedon Nov 17, 2026
Reproduction
Confirmed on Windows 11 at 57f6382 with a fresh
SIMLOCK_HOME=D:\sv\bug1665-triage. One correction: that folder is not owner-only. It inheritsAuthenticated Users:(M)fromD:\. The default home underC:\Users\<user>is owner-only, and Node still reports 666 for it.Test on
bug/1665-repro:src/daemon/connection-host.test.ts, "warns on macOS and Linux when group or others can reach the folder, and never on Windows, whose mode bits Node makes up".Root cause
Defect.
src/daemon/connection-host.ts:55-56(prepareDataDirectory, called fromsrc/daemon/main.ts:232) warns on any group/other bit. On Windows Node makes up those bits (0o666 or 0o444), so every start warns, whatever the ACL says.src/core/device-root.ts:174-176already skips the same check on Windows for this reason.Simplest fix
Add a
platformparameter. Returnundefinedonwin32. Passprocess.platformfrommain.ts. Scoperunning-the-daemon.mdx:149to macOS and Linux; the Windows aside below it already covers Windows. Mark the endpoint-directory test (connection-host.test.ts:38, 448 vs 438)it.skipIf(process.platform === "win32"), likeipc.test.ts:111.Alternatives rejected
icaclsand name anicaclsfix: it adds a child process at every start. ADR 0003 (2026-10-30 amendment) supports Windows on single-user machines only.Risk
D:\folders stay open to other accounts with no warning. The ADR accepts this for single-user machines.skipIfwas not run on Windows.Fast track
Written by an agent.
V3RON commentedon Nov 17, 2026
Maintainer decision
Read the folder's real Windows permissions instead of skipping the check: on Windows the daemon warns only when an account other than the user (and SYSTEM / Administrators) can read or change the data directory, and the warning names a Windows fix (an
icaclscommand), notchmod 700. A folder on another drive such asD:\, which grantsAuthenticated Usersmodify by default, should warn; the default home underC:\Users\<user>should not. A failed or unreadable ACL check gives no warning and never fails the start. macOS and Linux keep today's mode check. The website sentence inrunning-the-daemon.mdxfollows the new behaviour.This supersedes the "skip on Windows" proposal in the triage report; please triage again with this shape.
Written by an agent.
test: reproduce #1665 — on Windows the daemon warns from mode bits, n…
V3RON commentedon Nov 17, 2026
Supersedes the report above.
Reproduction
src/daemon/connection-host.test.ts, "on Windows warns from the folder's ACL only when another account can read or change it, names an icacls fix, and warns nothing when the ACL cannot be read; macOS and Linux keep the mode check" (branchbug/1665-repro, 67f155b). It replaces the skip-on-Windows test; its ACLs are whatGet-Aclreturned on Windows 11:Root cause
Defect.
src/daemon/connection-host.ts:55-58(prepareDataDirectory, called fromsrc/daemon/main.ts:232) checks mode bits everywhere; on Windows Node makes them up (0o666), so every start warns and nameschmod 700.Simplest fix
src/ports/directory-access.ts:DirectoryAccessReader.read(path)runs PowerShell (10 s timeout), returning{ user, entries: [{ sid, name, allow, rights }] }. SIDs, since names are localized.prepareDataDirectory(filesystem, path, { platform, directoryAccess }): onwin32, warn when an allow entry for a SID other than the user, SYSTEM, Administrators or CREATOR OWNER has a read or change right. A read that throws givesundefined.... accessible to other users (<names>); run icacls "<path>" /inheritance:r /grant:r "*<user>:(OI)(CI)F" "*S-1-5-18:(OI)(CI)F" "*S-1-5-32-544:(OI)(CI)F". Run in cmd.exe and PowerShell, it left the folder and its files owner-only; unquoted, PowerShell fails on(OI).running-the-daemon.mdx:149: "... with the command that fixes it:chmod 700on macOS and Linux,icaclson Windows."src/core/device-root.ts:174stays: device roots sit in the data directory by default, which this check covers, and that check refuses a platform, so an ACL check there would turn off the drivers for aD:\home.Alternatives rejected
None: the maintainer decided the shape.
Risk
connection-host.test.ts:176, 448 vs 438) still fails on Windows; that path never runs there (the endpoint is a pipe).Fast track
Written by an agent.
fix(daemon): the ACL reader takes entries whose rights set the top bit (
test(daemon): the data directory ACL test imports the port types and …
chore(ports): drop an unused type re-export (#1665)
test(ports): the PowerShell ACL reader is tested through the scripted…
test(ports): the ACL reader test proves the script reads the path fro…
V3RON commentedon Nov 17, 2026
Handoff
Done: PR #1674 built to the maintainer's decision (the daemon reads the folder's Windows ACL, warns only when another account can read or change it, names an
icaclsfix, and warns nothing when the read fails; macOS and Linux unchanged; website sentence updated). The review passed in round 1, round 2 and the fix-check, and R1–R3 are fixed. Checked on Windows 11: aC:\Usershome gives no warning, aD:\home warns, and after the printedicaclscommand a restart gives no warning. The PR is ready.Not done: merge.
Findings: none open.
src/core/device-root.tsstays as it is (see triage report).Blocked on:
fast-track: #1665 held: PR #1674 changes 347 lines, over 250.The maintainer merges the PR, or removesfast-track.Written by an agent.
V3RON commentedon Nov 17, 2026
Delivery run
Merged: none
Parked: #1665 — fast track holds PR #1674 (347 lines changed, limit 250); PR is ready, the maintainer merges it or removes
fast-trackWritten by an agent.