server2-preview: FATAL on Windows — tmux socket dir permission check always sees 0777 on NTFS
- Dominant language
- HTML
- Stars
- 48
- Forks
- 2
- Avg merge
- 1m
- Merged PRs (30d)
- 7
Description
## Summary
`server2-preview-20260831-080203-baeff37da` (and at least `server2-preview-20260831-023000-e53ff25f0`) cannot start on Windows. The new tmux socket directory permission check requires 0700, but Go's `os.Stat` on NTFS always reports 0777, so the check always fails.
## Steps to reproduce
1. Windows 11 (NTFS), `quicktui-server-windows-amd64.exe` from `server2-preview-20260831-080203-baeff37da`
2. tmux-windows 3.6a installed and in PATH
3. Run `quicktui-server serve --tmux-socket C:\Users\\AppData\Local\QuickTUI\tmux-socket\default`
## Actual result
```
[FATAL] [SERVER] tmux socket dir "C:\Users\\AppData\Local\QuickTUI\tmux-socket"
has permissions 0777, want 0700 (owner rwx, no group/other); refusing tmux backend.
```
Even after restricting the directory with `icacls /inheritance:r /grant ":(OI)(CI)F"`, Go still reports 0777 because NTFS does not support POSIX permission bits.
## Expected result
The server should start normally on Windows. The 0700 check is meaningful on Linux/macOS but is a false positive on NTFS.
## Additional notes
- Tried setting `QUICKTUI_SKIP_PERM_CHECK=1` env var — not recognized.
- Also hit `QUICKTUI_TMUX_SOCKET must be an absolute path: "\tmp\tmux--1\default"` when the server auto-detects the socket path on Windows (missing drive letter).
- Stable release `20260809-09` works fine on the same machine (no tmux socket dir permission check).
## Environment
- Windows 11 Home China 10.0.26200 (AMD64)
- Go runtime reports `os.FileMode` 0777 for all NTFS directories
- tmux-windows 3.6a-win32 (arndawg/tmux-windows via winget)
## Suggestion
Skip or relax the POSIX permission check on `runtime.GOOS == "windows"`, or use Windows ACL APIs (`GetNamedSecurityInfo` / `GetEffectiveRightsFromAcl`) to verify owner-only access on NTFS.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the Go implementation of the tmux socket directory permission check used by `quicktui-server serve`, then reproduce the behavior on Windows NTFS. The fix is done when the server starts on Windows without treating NTFS’s 0777 mode as a failure, while the 0700 check remains meaningful on POSIX systems; also verify the reported Windows auto-detected socket path issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100