Daniel C
Daniel C

Reputation: 2480

OSX brew executable owned by root?

Should /usr/local/bin/brew be owned by root:admin or $USER:admin?


Background: brew update is failing.

$ brew update 
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failed to update tap: homebrew/dupes
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failed to update tap: homebrew/versions
Already up-to-date.

I've followed both https://github.com/Homebrew/homebrew/issues/10292 and https://github.com/Homebrew/homebrew/issues/9953. My /usr/local/.git and /usr/local/Cellar have $USER:admin permissions.

However, I found out that the brew executable in /usr/local/brew belongs to root:admin. It makes sense to me that it would be $USER:admin instead, but since I don't remember setting it like that I don't want to change it and mess something up.

Upvotes: 0

Views: 3032

Answers (1)

Tim Smith
Tim Smith

Reputation: 6339

$USER:admin. Everything should be owned by your user account. Something like chown -R $USER Library/Homebrew should help (the taps have their git repos under Library/Taps).

If you'd like to use Homebrew in a multi-user setup, consider Brewdo.

Upvotes: 1

Related Questions