Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed homebrew using my other user account (which I use during work), but it is impossible to install software from my newly created personal account:

$ brew install unrar
Error: Cannot write to /usr/local/Cellar

A ls -dl /usr/local/Cellar/ shows that the directory is owned by my other user account.

How do I configure homebrew to allow multiple users to install software?

share|improve this question

3 Answers 3

set umaskfor each user first. (.basrc or .profile or .bash_profile)

umask 0002 # group write permition

then give group write permit ion to /usr/localrecursively:

sudo chmod -R g+w /usr/local/

then change owner to staff

sudo chgrp -R staff /usr/local

now each user who is in staff group can use brew install and other brew stuff... Mostly every user is in that group.

share|improve this answer
I had to do the same for /Library/Caches/Homebrew to make this actually work. And since all my users have Administrator Access enabled I skipped the chgrp –  Duvrai Dec 16 '14 at 16:50
up vote 1 down vote accepted

Here's my workaround:

su - myother_user_account -c "brew install ..."
share|improve this answer
This is not a recommended solution to the multiple-users problem. It requires users to be able to have root access and/or direct access to run commands as another user which kind of defeats the purpose of having user level privileges in the first place. You can break the model for your own use case given you own the box and both accounts, but it would be ill advised for anybody else to use this and your own system usage would be safer for using proper privilege separations. –  Caleb Sep 18 at 9:46

On the homebrew wiki, it mentions that you can install it anywere, try having local installations for each user.

share|improve this answer
I don't want that, actually. I want the software to go to a common place irrespective of who installed it. –  Sridhar Ratnakumar Jun 22 '11 at 3:36
I've tried this and wish I hadn't as you get messed up user permissions –  MatthewFord Jul 12 '11 at 11:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.