Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

Copy link

Was getting

erma4inapower@MacBook-Pro-Dmitrij  ~  brew services start php
Error: Permission denied @ rb_sysopen - /Users/erma4inapower/Library/LaunchAgents/homebrew.mxcl.php.plist

Ended up:

sudo chown -R $(whoami) /Users/erma4inapower/Library/LaunchAgents/

Copy link


Copy link

thanks! really helpful

Copy link

life saver!

Copy link

puchkii commented Jun 9, 2022


Copy link

thank you!

Copy link

thank you !!! what exactly did I just do ??? 🤔🤔🤔 you saved my lifeee

Copy link

dulfrey commented Jun 29, 2022

thank you 😁

Copy link

Sameto commented Jul 26, 2022

This just save my bacon... Thanks a lot...

Copy link

isobe-h commented Aug 1, 2022

thank you!

Copy link

It worked! Thank you!

Copy link

Youre a genius my friend, thank you!

Copy link

Thank you!

Copy link

my solution with link: /usr/bin/ruby -e "$(curl -fsSL"

and command: sudo chown -R "$(whoami)":admin /usr/local

it ":admin" for sum in user

MacOS BigSur 11.4

Copy link

Thank you ser!

Copy link

nnq1 commented Nov 10, 2022

great, you save my life

Copy link

ignoracenfly commented Nov 10, 2022 via email

Copy link

In my case I had to setup a new local user on my machine and to remove the old one.
Then the folder ( defined by brew --prefix ) looses its owner.
With this the owner is set to the new local user and - it works!

Copy link

ignoracenfly commented Jan 25, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment