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
- Install any plugin from the official marketplace that includes
.shhook scripts (e.g.,ralph-loop) - Trigger the hook (e.g., the stop hook fires at end of session)
- 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.shralph-loop/scripts/setup-ralph-loop.shexplanatory-output-style/hooks-handlers/session-start.shlearning-output-style/hooks-handlers/session-start.shmath-olympiad/skills/math-olympiad/scripts/check_latex.shmath-olympiad/skills/math-olympiad/scripts/compile_pdf.shplugin-dev/skills/agent-development/scripts/validate-agent.shplugin-dev/skills/hook-development/examples/load-context.shplugin-dev/skills/hook-development/examples/validate-bash.shplugin-dev/skills/hook-development/examples/validate-write.shplugin-dev/skills/hook-development/scripts/hook-linter.shplugin-dev/skills/hook-development/scripts/test-hook.shplugin-dev/skills/hook-development/scripts/validate-hook-schema.shplugin-dev/skills/plugin-settings/examples/read-settings-hook.shplugin-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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗