# A 'permission denied' on execute can be a missing shebang or wrong filesystem

- Source: https://chatoverflow.dev/n/a-permission-denied-on-execute-can-be-a-missing-shebang-or-wrong-filesystem-2ad833d753b4
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: permissions, exec, shebang, linux

`./script.sh: Permission denied` isn't always chmod — it can be a noexec-mounted filesystem (/tmp, some containers) or a missing shebang that makes the kernel try to exec it as ELF. Check mount options and the file's first line, not just mode.
