Proof Portal

Project overview

Omarchy

ProbeLabs65 findings · 95 requirements

A proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.

Inbox
ReportR-4867GitHub issuePublicReceived

omarchy windows vm launch always fails after a fresh install: chmod 0700 doesn't clear the setgid bit the container puts on ~/Windows

Reported by ianswope · filed Sep 3, 2026Closed upstream on 2026-09-20 by bjarneo via an automated message, as a duplicate of #9334 (R-1173). GitHub close reason: completed.

Received and recorded verbatim. Nothing has been checked yet.

At a glance

1 · What is claimed?
Only the report text below — no validator has restated it as checkable claims yet.
2 · What does it affect?
Not yet mapped to any requirement or component.
3 · Is it reproducible?
No validation has been run yet.
4 · What remains unclear?
  • Not validated yet: no claims, no reproducer.
5 · What happens next?
Our staff decide whether the report is valid. Where this project allows it, agents decide whether it duplicates another report or a known issue. No decision has been recorded yet.

Original report

omarchy windows vm launch always fails after a fresh install: chmod 0700 doesn't clear the setgid bit the container puts on ~/Windowsrevision 1 · captured 2026-10-04 12:10 UTC via poll

What happened

A fresh omarchy windows vm install completed successfully — Windows 11 installed, the omarchy-windows container is running, and the guest answers RDP on 127.0.0.1:3389. But omarchy windows vm launch fails every time:

❌ Failed to start Windows VM!
   Try checking: omarchy-windows-vm status

...while omarchy windows vm status simultaneously reports RUNNING. The VM is fine; the launch preflight is rejecting it.

Root cause

launch → priv up_wait → __priv_up_wait → assert_mounts_safe → prepare_caller_mounts, which runs a privacy preflight (omarchy-windows-vm, 4.0.2-1):

583  chmod 0700 -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd" || {
588  storage_mode=$(stat -Lc '%a' "/proc/$BASHPID/fd/$storage_fd" 2>/dev/null) || storage_mode=""
589  shared_mode=$(stat -Lc '%a' "/proc/$BASHPID/fd/$shared_fd" 2>/dev/null) || shared_mode=""
590  if [[ $storage_mode != 700 || $shared_mode != 700 ]]; then

Two things combine:

  1. The dockurr/windows container creates the /shared mount source (~/Windows) setgid — it was drwxrwsrwx (2777) here after install.
  2. GNU `chmod` does not clear setuid/setgid on a directory when given a numeric mode, including a 4-digit one. chmod 0700 on a 2777 directory yields 2700, not 700.

So line 588-589 read back 2700, the string comparison on line 590 fails, prepare_caller_mounts returns 1, and launch reports the VM failed to start.

Minimal repro of the chmod half (GNU coreutils 9.11, btrfs):

$ mkdir d && chmod 2777 d && chmod 0700 d && stat -c %a d
2700

Steps to reproduce

  1. omarchy windows vm install, let Windows 11 finish installing.
  2. omarchy windows vm status → RUNNING.
  3. omarchy windows vm launch → "Failed to start Windows VM!"
  4. stat -Lc '%a' ~/Windows → `2700` (while ~/.windows is a clean 700).

The privileged half does run — journalctl confirms polkit authorized omarchy-windows-vm __priv up_wait as root immediately before the failure, so this is not an authorization problem.

Expected

launch connects, since the container is up and the guest is serving RDP.

Workaround

$ chmod g-s ~/Windows

launch then works. This will recur whenever the container re-applies setgid to the share.

Suggested fix

Either strip the bits explicitly — symbolic modes do clear them:

chmod u=rwx,go=,ug-s -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd"

or compare only the permission bits, so no setuid/setgid/sticky bit can trip the check:

(( (8#$storage_mode & 0777) == 0700 && (8#$shared_mode & 0777) == 0700 )) || { ... }

Verified locally:

commandresult on a 2777 dir
chmod 07002700 ✗ (current behavior)
chmod u=rwx,go=2700 ✗
chmod u=rwx,go=,ug-s700 ✓

Lines 1018 (chmod 0700 -- "$storage" "$shared") and 1061 (chmod 0700 "$dir") carry the same exposure.

System

  • Omarchy 4.0.2-1 (stable channel)
  • Kernel 7.1.9-arch1-2
  • CPU Intel Core Ultra 7 255H · GPU Intel Arrow Lake-P (Arc Pro 130T/140T)
  • Docker 29.7.2 · dockurr/windows · Windows 11 25H2
  • GNU coreutils 9.11 · home on btrfs

(omarchy debug --no-sudo --print referenced in the contributing docs doesn't exist in 4.0.2 — Unknown Omarchy command — so the above was collected by hand.)

View raw text
## What happened

A fresh `omarchy windows vm install` completed successfully — Windows 11 installed, the `omarchy-windows` container is running, and the guest answers RDP on `127.0.0.1:3389`. But `omarchy windows vm launch` fails every time:

```
❌ Failed to start Windows VM!
   Try checking: omarchy-windows-vm status
```

...while `omarchy windows vm status` simultaneously reports **RUNNING**. The VM is fine; the launch preflight is rejecting it.

## Root cause

`launch` → `priv up_wait` → `__priv_up_wait` → `assert_mounts_safe` → `prepare_caller_mounts`, which runs a privacy preflight (`omarchy-windows-vm`, 4.0.2-1):

```bash
583  chmod 0700 -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd" || {
588  storage_mode=$(stat -Lc '%a' "/proc/$BASHPID/fd/$storage_fd" 2>/dev/null) || storage_mode=""
589  shared_mode=$(stat -Lc '%a' "/proc/$BASHPID/fd/$shared_fd" 2>/dev/null) || shared_mode=""
590  if [[ $storage_mode != 700 || $shared_mode != 700 ]]; then
```

Two things combine:

1. The `dockurr/windows` container creates the `/shared` mount source (`~/Windows`) **setgid** — it was `drwxrwsrwx` (2777) here after install.
2. **GNU `chmod` does not clear setuid/setgid on a directory when given a numeric mode**, including a 4-digit one. `chmod 0700` on a 2777 directory yields **2700**, not 700.

So line 588-589 read back `2700`, the string comparison on line 590 fails, `prepare_caller_mounts` returns 1, and `launch` reports the VM failed to start.

Minimal repro of the `chmod` half (GNU coreutils 9.11, btrfs):

```console
$ mkdir d && chmod 2777 d && chmod 0700 d && stat -c %a d
2700
```

## Steps to reproduce

1. `omarchy windows vm install`, let Windows 11 finish installing.
2. `omarchy windows vm status` → **RUNNING**.
3. `omarchy windows vm launch` → **"Failed to start Windows VM!"**
4. `stat -Lc '%a' ~/Windows` → **`2700`** (while `~/.windows` is a clean `700`).

The privileged half does run — `journalctl` confirms polkit authorized `omarchy-windows-vm __priv up_wait` as root immediately before the failure, so this is not an authorization problem.

## Expected

`launch` connects, since the container is up and the guest is serving RDP.

## Workaround

```console
$ chmod g-s ~/Windows
```

`launch` then works. This will recur whenever the container re-applies setgid to the share.

## Suggested fix

Either strip the bits explicitly — symbolic modes *do* clear them:

```bash
chmod u=rwx,go=,ug-s -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd"
```

or compare only the permission bits, so no setuid/setgid/sticky bit can trip the check:

```bash
(( (8#$storage_mode & 0777) == 0700 && (8#$shared_mode & 0777) == 0700 )) || { ... }
```

Verified locally:

| command | result on a 2777 dir |
|---|---|
| `chmod 0700` | `2700` ✗ (current behavior) |
| `chmod u=rwx,go=` | `2700` ✗ |
| `chmod u=rwx,go=,ug-s` | `700` ✓ |

Lines 1018 (`chmod 0700 -- "$storage" "$shared"`) and 1061 (`chmod 0700 "$dir"`) carry the same exposure.

## System

- Omarchy **4.0.2-1** (stable channel)
- Kernel 7.1.9-arch1-2
- CPU Intel Core Ultra 7 255H · GPU Intel Arrow Lake-P (Arc Pro 130T/140T)
- Docker 29.7.2 · `dockurr/windows` · Windows 11 25H2
- GNU coreutils 9.11 · home on btrfs

(`omarchy debug --no-sudo --print` referenced in the contributing docs doesn't exist in 4.0.2 — `Unknown Omarchy command` — so the above was collected by hand.)

Validation

Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.

Linked

Not linked to any known issue, other report or change yet.

Decision

Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.

No decision has been recorded yet.