mirror of https://github.com/garrytan/gstack.git
restrictFilePermissions/restrictDirectoryPermissions granted icacls permissions by bare username (os.userInfo().username). On machines where the username collides with another account object — most commonly when the machine name equals the username — LookupAccountName resolves the bare name to the machine's domain SID (S-1-5-21-... with no RID), producing an ACL that denies even the owner. ~/.gstack becomes inaccessible and browse fails with EPERM on mkdir. Resolve the current user's SID via %SystemRoot%\System32\whoami.exe (absolute path — a bare 'whoami' can hit GNU coreutils' whoami from the Git for Windows PATH, which rejects /user) and grant *<SID>:(F), which is unambiguous. Fall back to USERDOMAIN\USERNAME if SID resolution fails. Note: dist/browse.exe and dist/server-node.mjs embed this module, so a dist rebuild is required for the fix to take effect in releases. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| test | ||
| PLAN-snapshot-dropdown-interactive.md | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||