Skip to content

[Bug] Auto-update fails with Permission denied on WSL2 .deb installation #131

Description

@Nza6920

Description

The built-in updater fails with the following error when Codex Switcher is installed system-wide from the Debian package inside WSL2:

Update failed: Permission denied (os error 13)

Environment

  • Host OS: Windows 11, build 26200.9168, x64
  • Runtime: WSL2 with WSLg
  • WSL distribution: Ubuntu 24.04.3 LTS (Noble Numbat), x86_64
  • WSL kernel: 6.6.87.2-microsoft-standard-WSL2
  • Installation method: Debian package (.deb), installed system-wide
  • Installed package: codex-switcher 0.2.9 amd64
  • Executable: /usr/bin/codex-switcher
  • Available update: v0.2.11
  • Codex CLI: codex-cli 0.149.1
  • Codex Switcher is launched as a regular, non-root user through WSLg

Steps to reproduce

  1. Install Codex Switcher v0.2.9 from the .deb release package in Ubuntu running under WSL2.
  2. Launch Codex Switcher as a regular user through WSLg.
  3. Accept the in-app update to v0.2.11.
  4. The update download starts, but installation fails.

Actual behavior

The updater shows:

Update failed: Permission denied (os error 13)

The application remains on v0.2.9.

Expected behavior

The updater should either:

  1. successfully update a system-wide .deb installation using an appropriate privilege flow, or
  2. detect that the executable is managed by a system package and show clear instructions to update by downloading/installing the new .deb package instead of attempting to overwrite /usr/bin/codex-switcher as an unprivileged user.

Additional context

The exact error is shown in the attached/local screenshot. Account identifiers have been redacted. The failure appears consistent with the updater attempting to replace a root-managed executable while the application is running as a regular user.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions