How to Fix the “zsh: permission denied” Mac Terminal Error

Do you keep receiving a “zsh: permission denied” error on your Mac’s Terminal? Several reasons—such as insufficient permissions and ownership issues—often cause that.

Below, we’ll discuss some of the things you can do to fix the “zsh: permission denied” error on the macOS Terminal. So, let’s get started.

4

Double-Check the Command

It’s a good idea to begin by double-checking the command that causes the “zsh: permission denied” Terminal output. An incorrect command, syntax, or typo in the file path or filename is a common reason for the error.

If you’re new to command-line interpreters, feel free to check ourbeginner’s guide to the Mac Terminalandcommands cheat sheetfor help.

Terminal on Mac screen

Unlock the File or Folder

The “zsh: permission denied” Terminal error can also appear when you attempt to interest with alocked file or folder in macOS. To unlock the file or folder,Control-click the item, selectGet Info, and clear the box next toLocked.

Alternatively, you’re able to use the following command to unlock an item via the Terminal itself:

Get Info dialog for a file in macOS.

Add Execute Permissions

If the “zsh: permission denied” error occurs while opening an SH (shell script) file in the macOS Terminal, it’s likely that it does not have “execute” permissions.

To fix that, use either of the following commands to add “execute” permissions to the file:

Adding execute permissions to an SH file through the macOS Terminal.

Modify User and Group Ownership

If the “zsh: permission denied” error persists, modify the user and group ownership of the file or folder with the following Terminal command. Replace both instances ofUSERwith your Mac account username.

ZSH Permission Denied Error on Mac Fixed

The macOS Terminal’s “zsh: permission denied” is not an unusual error to encounter. An incorrectly-run command is often the primary suspect, but keep the rest of the above pointers in mind, so you know what to do the next time you run into it.

By default, the zsh prompt in Terminal looks bland, but macOS lets you customize it to your liking.

A person using Terminal on their MacBook Pro

Obsidian finally feels complete.

The fix was buried in one tiny toggle.

You’re not getting the most out of what you pay for iCloud+.

Free AI tools are legitimately powerful; you just need to know how to stack them.

Who asked for these upgrades?

Technology Explained

PC & Mobile