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-5048GitHub issuePublicReceived

Windows VM fails to launch when shared directory retains setgid bit

Reported by minisiowo · filed Sep 12, 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

Windows VM fails to launch when shared directory retains setgid bitrevision 1 · captured 2026-10-04 12:10 UTC via poll

System details

  • CPU: AMD Ryzen 5 PRO 8540U with Radeon 740M Graphics
  • GPU: AMD HawkPoint2 integrated graphics
  • Omarchy: 4.0.3-1
  • Kernel: 7.2.3-arch1-3
  • Filesystem containing $HOME/Windows: Btrfs
  • Windows VM image: dockurr/windows

What's wrong?

The Windows VM can fail to launch after it has previously run and the host has been restarted.

The Polkit authorization succeeds, but the command exits with only:

Starting Windows VM (this may prompt for authorization)...
❌ Failed to start Windows VM!
   Try checking: omarchy-windows-vm status

The shared directory's mode changes after the VM runs. I observed both 2700 and 2777:

stat -c '%a %A %n' "$HOME/Windows"
2700 drwx--S--- /home/<user>/Windows

and later:

2777 drwxrwsrwx /home/<user>/Windows

After reboot, the protected bind mounts need to be recreated. The launch then fails while validating the shared mount because its mode is not exactly 700.

Steps to reproduce

  1. Install and launch the Windows VM.
  2. Let Windows start successfully.
  3. Close/stop the VM and restart the host.
  4. Check the directory mode with stat -c '%a %A %n' "$HOME/Windows".
  5. Run omarchy windows vm launch.
  6. Complete the Polkit authorization prompt.
  7. The launch fails with the generic error above.
  8. Explicitly clear setgid and restore the permissions:
   chmod g-s "$HOME/Windows"
   chmod 0700 "$HOME/Windows"
  1. Run omarchy windows vm launch again. The VM starts successfully.

The problem recurs once the VM changes the directory permissions again.

Suspected cause

In omarchy-windows-vm, prepare_caller_mounts() attempts to normalize both source directories with:

chmod 0700 -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd"

It then requires the mode to be exactly 700:

if [[ $storage_mode != 700 || $shared_mode != 700 ]]; then
  return 1
fi

GNU chmod preserves the setgid bit on directories when a numeric mode is specified unless the special bit is explicitly cleared. Therefore chmod 0700 can leave this directory as 2700. The following exact-mode check returns failure without printing a diagnostic, producing only the generic launcher error.

The same pattern also exists in prepare_user_mount_sources().

Suggested fix

Explicitly clear setgid while normalizing the directory, for example:

chmod g-s -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd" &&
chmod 0700 -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd"

It would also help to print the actual and expected modes before returning from the exact-mode validation.

View raw text
## System details

- CPU: AMD Ryzen 5 PRO 8540U with Radeon 740M Graphics
- GPU: AMD HawkPoint2 integrated graphics
- Omarchy: 4.0.3-1
- Kernel: 7.2.3-arch1-3
- Filesystem containing `$HOME/Windows`: Btrfs
- Windows VM image: `dockurr/windows`

## What's wrong?

The Windows VM can fail to launch after it has previously run and the host has been restarted.

The Polkit authorization succeeds, but the command exits with only:

```text
Starting Windows VM (this may prompt for authorization)...
❌ Failed to start Windows VM!
   Try checking: omarchy-windows-vm status
```

The shared directory's mode changes after the VM runs. I observed both `2700` and `2777`:

```bash
stat -c '%a %A %n' "$HOME/Windows"
```

```text
2700 drwx--S--- /home/<user>/Windows
```

and later:

```text
2777 drwxrwsrwx /home/<user>/Windows
```

After reboot, the protected bind mounts need to be recreated. The launch then fails while validating the shared mount because its mode is not exactly `700`.

### Steps to reproduce

1. Install and launch the Windows VM.
2. Let Windows start successfully.
3. Close/stop the VM and restart the host.
4. Check the directory mode with `stat -c '%a %A %n' "$HOME/Windows"`.
5. Run `omarchy windows vm launch`.
6. Complete the Polkit authorization prompt.
7. The launch fails with the generic error above.
8. Explicitly clear setgid and restore the permissions:

   ```bash
   chmod g-s "$HOME/Windows"
   chmod 0700 "$HOME/Windows"
   ```

9. Run `omarchy windows vm launch` again. The VM starts successfully.

The problem recurs once the VM changes the directory permissions again.

## Suspected cause

In `omarchy-windows-vm`, `prepare_caller_mounts()` attempts to normalize both source directories with:

```bash
chmod 0700 -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd"
```

It then requires the mode to be exactly `700`:

```bash
if [[ $storage_mode != 700 || $shared_mode != 700 ]]; then
  return 1
fi
```

GNU `chmod` preserves the setgid bit on directories when a numeric mode is specified unless the special bit is explicitly cleared. Therefore `chmod 0700` can leave this directory as `2700`. The following exact-mode check returns failure without printing a diagnostic, producing only the generic launcher error.

The same pattern also exists in `prepare_user_mount_sources()`.

## Suggested fix

Explicitly clear setgid while normalizing the directory, for example:

```bash
chmod g-s -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd" &&
chmod 0700 -- "/proc/$BASHPID/fd/$storage_fd" "/proc/$BASHPID/fd/$shared_fd"
```

It would also help to print the actual and expected modes before returning from the exact-mode validation.

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.