Share this article
Improve this guide
Fix: Zsh: Permissions Denied in Mac Terminal in 4 Quick Steps
Everything you need to regain access to your file
5 min. read
Updated onOctober 4, 2023
updated onOctober 4, 2023
Share this article
Improve this guide
Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more
Key notes
The Zsh: Permissions Denied error is one of the common issues users encounter on Mac. The error occurs when you are trying to access a locked file or run a command without sufficient permission.
Fortunately, you can eliminate the Zsh: Permissions Denied error effortlessly with the right information. In this guide, we will provide you with everything you need to fix this error once and for all.
What is the ZSH: Permissions Denied error on Mac?
Terminal is the powerful command line interface that offers users a UNIX environment to run commands and create scripts. You can use this interface toaccess just about any file part on Macwith the right command.
However, if you start getting the Zsh: Permissions Denied error, it means the original command you are trying to use on Terminal to open a file is wrong, or the file or folder is locked.
In some cases, this can be a good thing, as file permission helps to protect your documents from unauthorized access. Nonetheless, we will show you how to get past the error message on your device in the next section of this guide.
How do I fix ZSH: Permissions Denied in Terminal Mac?
1. Checking file permissions
The first thing to do if you are dealing with the ZSH: Permissions Denied error is to check if you have the appropriate permissions to make changes to the file you are working on.
If you have full control, you will find RWXR next to your username.
2. Allow Terminal full disk access
If you are getting the Zsh: Permissions Denied error while trying to access a file from Terminal, it might be because Terminal does not have full disk permissions.
The solution to this is to grant it full access to your disk after typing your user password.
3. Change the directory ownership
Sometimes, this permission error can be due to a lack of directory ownership for a user account. Following the steps above should help you change ownership easily.
4. Using SUDO commands
The SUDO command, which is also known as Super User do, grants your super privilege to access your account and other user accounts. So, if the Zsh Permissions Denied error is due to a privilege issue, this command help you fix it.
How do I open permission denied on Mac?
To open a file or folder giving the permission denied error on Mac, you need to change the ownership directory, as shown above.
Another option is to change file permissions using Finder, as shown below:
With this, the permission denied error should be fixed for good.
Why is my Zshrc file locked?
Your Zshrc file might be locked because you usedchmodto lock it. This helps to provide protection against unauthorized access, which is why you might get the permission denied error while trying to open the file.
The Zsh: Permissions Denied error on Mac is basically down to the lack of permission toopen the folderor file giving the error.
This can be easily fixed by giving Terminal full access to your disk and changing the directory’s ownership, among other solutions in this guide.
Provided you follow the steps above carefully, the error message should be gone for good. Lastly, if you want to knowhow to unzip files or folders using Terminal, check our detailed guide to do it easily.
More about the topics:Permission error
Ola-Hassan Bolaji
Windows Hardware Expert
A Computer Engineering graduate, he has spent most of his life reading and writing about computers.
He finds joy in simplifying complex topics into simple solutions for PC users. The quality of his work and providing step-wise tested and proven solutions to PC issues are all that matter to him.
Away from computers, he is either reading or watching football!
User forum
0 messages
Sort by:LatestOldestMost Votes
Comment*
Name*
Email*
Commenting as.Not you?
Save information for future comments
Comment
Δ
Ola-Hassan Bolaji
Windows Hardware Expert
He’s a Computer Engineering graduate who has spent most of his life reading and writing about computers & operating systems.