Software⏱️ 2 min read📅 2026-05-31

How to Fix: Terminal error: zsh: permission denied: ./startup.sh

Permission denied error when running a script due to lack of execute permissions.

Quick Answer: Check if the script has execute permissions by running `chmod +x startup.sh` in the terminal.

The error message 'zsh: permission denied: ./startup.sh' indicates that the script './startup.sh' is not executable, which means it lacks the necessary permissions to execute. This can be caused by several reasons such as:

🛑 Root Causes of the Error

  • Insufficient permissions on the script file.
  • The script is not in a directory where you have execute privileges.
  • A previous attempt to run or modify the script has removed its executable permissions.

🚀 How to Resolve This Issue

Method 1: Changing File Permissions

  1. Step 1: Open a terminal and navigate to the directory where your script is located.
  2. Step 2: Use the `chmod` command to change the file permissions. For example, to make the script executable by you, use `chmod +x startup.sh

Method 2: Running with Elevated Privileges

  1. Step 1: Open a terminal and use the `sudo` command to run the script. For example, use `sudo ./startup.sh nginx:start

🎯 Final Words

By following these steps, you should be able to resolve the 'zsh: permission denied' error and successfully run your script.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions