You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I reset file permissions back to defaults?

A few months ago I was using JDisk Report to scan my file tree and find the biggest space hogs, but it's a java app and doesn't understand the macOS permission system, so even though I was an admin and it could scan the entire file tree, it decided that it couldn't, so in a rather misguided moment I changed some file permissions with chmod. It didn't work and I thought nothing of it, except now that HomeBrew can't install packages because it's somehow been denied access to the folder where it stores them. I just want the permissions to go back to how there were, is any way to do this?


I can't post the specs because it's updating right now but if anyone needs them I will edit them in.

iMac 21.5", macOS 10.13

Posted on Dec 20, 2019 3:45 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 20, 2019 4:05 AM

Read in Resolve issues caused by changing the permissions of items in .... Follow the instructions for macOS High Sierra or earlier, all the way at the bottom.


HomeBrew can't install packages because it's somehow been denied access to the folder where it stores them.


Where does it want to store them, specifically? Some file locations have been rendered off-limits in recent macOS versions, in Apple's ongoing effort to protect Mac users from themselves. Generally speaking you can do whatever you want as long as you stay within your Home folder... that's your playground.

3 replies
Question marked as Top-ranking reply

Dec 20, 2019 4:05 AM in response to Azursortronear

Read in Resolve issues caused by changing the permissions of items in .... Follow the instructions for macOS High Sierra or earlier, all the way at the bottom.


HomeBrew can't install packages because it's somehow been denied access to the folder where it stores them.


Where does it want to store them, specifically? Some file locations have been rendered off-limits in recent macOS versions, in Apple's ongoing effort to protect Mac users from themselves. Generally speaking you can do whatever you want as long as you stay within your Home folder... that's your playground.

Dec 20, 2019 8:10 AM in response to Azursortronear

On my system the Homebrew stuff is located in /usr/local/Homebrew and that folder has permissions 775 and are owned by myuser/admin (username/groupname), and the folders underneath it have permissions 755 and are owned by myuser/admin, but all the files in the Home-brew folder have permissions 644. So perhaps you might try:


cd /usr/local/Homebrew
find . -type d -exec chmod 755 {} \;


No guarantees this will work -- as mucking with permissions like this is not a good idea, since global assumptions are very hard to make without extensive research.


Perhaps it might be easier if you could show what the existing permissions in your Homebrew setup are:


cd /usr/local/Homebrew
ls -la


as well as tell us what the errors you're getting exactly are. Also what exactly did your "chmod" mods do?


Good luck...

How can I reset file permissions back to defaults?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.