Plugin marketplace install strips execute permissions from .sh files

Resolved 💬 3 comments Opened Mar 27, 2026 by JayDoubleu Closed Mar 27, 2026

Description

When plugins are installed via the marketplace, shell scripts (.sh files) lose their execute permission bit. Files that are 100755 in the source repository end up as 100644 (-rw-r--r--) on disk after installation.

This causes hook scripts to fail with Permission denied errors.

Steps to reproduce

  1. Install any plugin from the official marketplace that includes .sh hook scripts (e.g., ralph-loop)
  2. Trigger the hook (e.g., the stop hook fires at end of session)
  3. Observe the error:
Stop hook error: Failed with non-blocking status code: /bin/sh: line 1:
/home/user/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh: Permission denied

Evidence

The file is correctly 100755 in the source repo:

$ gh api 'repos/anthropics/claude-plugins-official/git/trees/main?recursive=1' \
    --jq '.tree[] | select(.path | test("ralph-loop/hooks")) | "\(.path) mode=\(.mode)"'

plugins/ralph-loop/hooks/hooks.json mode=100644
plugins/ralph-loop/hooks/stop-hook.sh mode=100755

But after marketplace install it's 100644:

$ ls -la ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh
-rw-r--r--. 1 user user 7533 Mar 27 18:50 stop-hook.sh

This affects 15 .sh files across multiple official plugins, not just ralph-loop:

  • ralph-loop/hooks/stop-hook.sh
  • ralph-loop/scripts/setup-ralph-loop.sh
  • explanatory-output-style/hooks-handlers/session-start.sh
  • learning-output-style/hooks-handlers/session-start.sh
  • math-olympiad/skills/math-olympiad/scripts/check_latex.sh
  • math-olympiad/skills/math-olympiad/scripts/compile_pdf.sh
  • plugin-dev/skills/agent-development/scripts/validate-agent.sh
  • plugin-dev/skills/hook-development/examples/load-context.sh
  • plugin-dev/skills/hook-development/examples/validate-bash.sh
  • plugin-dev/skills/hook-development/examples/validate-write.sh
  • plugin-dev/skills/hook-development/scripts/hook-linter.sh
  • plugin-dev/skills/hook-development/scripts/test-hook.sh
  • plugin-dev/skills/hook-development/scripts/validate-hook-schema.sh
  • plugin-dev/skills/plugin-settings/examples/read-settings-hook.sh
  • plugin-dev/skills/plugin-settings/scripts/parse-frontmatter.sh

Expected behaviour

The marketplace installer should preserve the execute permission bit from the source repository when writing .sh files to disk, or set +x on all .sh files after download.

Workaround

find ~/.claude/plugins/marketplaces -name "*.sh" ! -perm -111 -exec chmod +x {} +

Environment

  • Claude Code CLI (latest as of 2026-03-27)
  • Fedora 44 (Toolbox)
  • zsh

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗