I have a Mac that is shared between two engineers. Both have separate user accounts. Both need to run brew update
and brew install...
occasionally.
How do I set this up without getting errors like: /usr/local must be writable!
?
Yeah, I could have UserA
take over the permissions of /usr/local
every time he wants to use brew (and same with UserB
), but that seems like a lot of unnecessary trouble.
You can also change the group permissions to admin or another group that both of your users are in:
chgrp -R admin /usr/local chmod -R g+w /usr/local
Original source: https://gist.github.com/jaibeee/9a4ea6aa9d428bc77925
UPDATE:
In macOS High Sierra you can't change the owner, group or permissions of /usr/local
. So you have to change the group and permissions of the subfolders:
chgrp -R admin /usr/local/* chmod -R g+w /usr/local/*
UPDATE September 2018, High Sierra 10.13.6
brew
are in the admin groupWill require access / privileges to use the sudo command
echo $(brew --prefix) echo $(groups $(whoami)) sudo dseditgroup -o edit -a $(whoami) -t user admin sudo chgrp -R admin $(brew --prefix) sudo chmod -R g+rwX $(brew --prefix) ls -lah $(brew --prefix)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With