How to Fix “ZSH Permission Denied” Errors: 6 Easy Ways

how-to-fix-zsh-permissions-denied-error

Solution 1: Access to Terminal, Type the Is –I command, drag your required file to the Terminal, press the Return key, and you will find results to fix the issue.

Solution 2: Click on the Apple logo, Select System preferences, Navigate to the Privacy option, tap on the Padlock icon while scrolling down, type your password, Click on the +shaped icon to give full access to the disk, and restart your Mac.

Zsh permission denied error occurs on the macOS screen when your Terminal app fails to follow your commands. Zsh, more commonly known as Z shell is a default Shell on macOS that gives access to any of OS’s services. Simply we get access to any of the files by double-clicking it or using Terminal with the execution of command. If you use Terminal for opening a file and receive a “zsh: permission denied” message on the screen instead. It means you have formatted a wrong command or file permission is not complete.

What is a Mac Terminal?

We can say, that Terminal is an emergency gateway to give access to your required content on Mac using commands. It requires the inserting of commands and familiarity with basic functions such as you need to use the “mv” command for accessing any folder.

No doubt, it offers quick access to any of your preferred content, so most of the users love to use it. It also allows you to get access to hidden macOS parts that are not possible via System Preferences.

You can open it via Spotlight, launch Spotlight by pressing Command + Space, type Terminal in the search bar, and click it from search results, or open the Finder app, click in the Applications, next on the Utilities, and double click on Terminal.

In the post, we will guide you on how to get rid of the “Zsh permissions denied error” from your Mac while offering some simple and authentic ways for your ease. Before we dive into our main topic, let’s have a look at the reasons why we have to face the ‘zsh permissions denied error’. Here are some reasons;

  • The files you want to access have been locked by the owner and create a permission error.
  • If you enter a wrong command, it also creates a permission error.

How to Fix Zsh Permission Denied in Terminal

We hope you understand well the term Zsh and the reasons for creating the “zsh permissions denied error” issue. Now we move to our main topic and discuss the methods for fixing the issue.

1 Use Terminal to Check File Permissions

On Mac, we have two ways of monitoring disk permissions; Terminal and GUI. Here the issue is related to Terminal, so we use Terminal to check file permissions. Follow the given steps;

  • Unlock your Mac, and access to Terminal via Finder or Spotlight.
  • Type Is –I command while making sure to add space at the end of space, you can avoid the situation by double-clicking the command formatting.

  • Select your required file, drag it to the Terminal, and press the Return key.
  • Here you will find results i.e. in the case of PWXR you have required file permissions, and you can read, write, and execute the file. If the result is ‘R’, you have read-only permissions. Try to fix the zsh issue using the results.
  • Restart your system.
fix-zsh-permissions-mac-4

2 Modify File Permissions to Fix ZSH Permissions Denied Error

If the issue has occurred because of permissions and you are unable to write. It is better to repair your file permissions. Follow the given steps.

  • Go to Get Info by right-clicking the file or folder you want to repair.

  • In case of not accessing the information in Sharing & Permission, click on the arrow.
  • Select a username from the Name column.
  • A pop-up menu will appear on the screen to select privilege settings.

3 Change Directory Ownership to Fix ZSH Permissions Denied Error

Changing directory ownership can also help you to fix the “zsh permission denied error”. Follow the given steps;

  • Unlock your Mac, and access to Terminal via Finder or Spotlight.

  • Type command chown -R $USER:$USER /path/to/directory
  • Change the $USER with the user you logged in.
  • Specify the location where you want to write in place of /path/to/directory.

4 Control Disk using Terminal to Fix ZSH Permissions Denied Error

If the file you are working with doesn’t have full access to the disk, the encounter situation can be created. You can fix it by following the given steps;

  • Unlock your Mac, and click on the Apple logo from the top left corner of the screen.
  • Select System Preferences from the appeared drop-down menu.
  •  Navigate to the Privacy option while clicking on the Privacy & Security tile.
  • Scroll down to the bottom left of the screen and tap on the Padlock icon.
  • Type your user password in the Padlock.
  • A list of checkbox Terminal will appear after you complete the login process.
  • Click on the Plus-shaped icon to give full access to the disk.
  • Exist Terminal, and restart your system.

5 Use a SUDO command to Fix ZSH Permissions Denied Error

SUDO is the short form of Superuser do, which means, the command gives the super rights to the user to get superuser privileges or execute the command as another user. You need to enter your current password instead of the root password. Follow the given steps;

  • sudo chmod 755 ~/Themes/ObsidianCode.xccolortheme
  • sudo chmod 755 /dvtcolorconvert.rb

6 Use an Alternative Terminal to Fix the ZSH Permissions Denied Error

Core-Shell is an alternate to Terminal that can emulate Terminal while allowing you to customize your Terminal. It works similarly to Terminal with an awesome user interface and helps you to run commands. It offers a quick login process with a one-click login reconnect capability for remote computers as well.

Almighty is another powerful suggestion for improving productivity while saving your Mac from idle sleeping. It offers multiple innovative features i.e.

  • Get rid of ambiguous keyboard inputs while locking it.
  • Give access to hidden apps in Finder.
  • Save your Mac from idle sleeping.
  • Hide menu bar items and all files.

Conclude

So friends, Terminal is the quickest way of accessing your required files or folders, but it stops working and starts to give the error “zsh permission denied error” on the screen instead of giving access to your files.


Christopher Kippax


×

Get More Updates

📲 Join our WhatsApp Channel

🐦 Follow us on Twitter