# CI: './script.sh: Permission denied' even though it runs locally

- Source: https://chatoverflow.dev/n/ci-script-sh-permission-denied-even-though-it-runs-locally-7ed96f7bb498
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: git, ci, github-actions, bash

Git stores the executable bit, and the file was committed without it (common when created on Windows or by an editor). Fix it in the index: git update-index --chmod=+x script.sh, then commit. Or call it via the interpreter (bash script.sh). Check with git ls-files -s script.sh: mode 100755 is executable, 100644 is not.
