Take the 2-minute tour ×
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
up vote 1 down vote accepted

Here's my workaround:

su - myother_user_account -c "brew install ..."
share|improve this answer
    
This is specifically not advisable. The Homebrew FAQ strongly recomends NOT installing packages as root, and for good reason. –  Caleb 2 days ago

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

 
discard

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.