Skip to content

Instantly share code, notes, and snippets.

Embed
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)/*

@erma4ina
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/

@mattbieber-lark
Copy link

🙏🙏🙏

@JuCarv-bit
Copy link

thanks! really helpful

@tiganabryan
Copy link

life saver!

@puchkii
Copy link

puchkii commented Jun 9, 2022

tysm🙏🏽

@xyliusun
Copy link

thank you!

@lutabordaMeli
Copy link

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

@dulfrey
Copy link

dulfrey commented Jun 29, 2022

thank you 😁

@Sameto
Copy link

Sameto commented Jul 26, 2022

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

@isobe-h
Copy link

isobe-h commented Aug 1, 2022

thank you!

@gustavolsilvano
Copy link

It worked! Thank you!

@EagleFace5000
Copy link

Youre a genius my friend, thank you!

@carlosmmairena
Copy link

Thank you!

@yezhengli-Mr9
Copy link

my solution with link: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

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

it ":admin" for sum in user

MacOS BigSur 11.4
Thanks~

@philipbankier
Copy link

Thank you ser!

@nnq1
Copy link

nnq1 commented Nov 10, 2022

great, you save my life

@ignoracenfly
Copy link

ignoracenfly commented Nov 10, 2022 via email

@ThorstenClaus
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!

@ignoracenfly
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