Enable multiple users to install software using homebrew
set umask
for each user first. (.basrc or .profile or .bash_profile)
umask 0002 # group write permission
then give write permission for groups via /usr/local
recursively:
sudo chmod -R g+w /usr/local/
then change the owner to staff
sudo chgrp -R staff /usr/local
now, each user, who is in staff
group can use brew install
and other brew related operations... Mostly every user is in that group.
In case your account has root / su
/ sudo
access, you can try the following workaround:
su - myother_user_account -c "brew install ..."
sudo
alternative:
sudo -u myother_user_account brew install ...
A handy shell alias (for .bashrc
/.zshrc
/...):
alias brew="sudo -u myother_user_account brew"