Skip to content

Instantly share code, notes, and snippets.

@rubenerd
Last active August 29, 2015 14:13
Show Gist options
  • Save rubenerd/1ebf8d27edba68b1ee9d to your computer and use it in GitHub Desktop.
Save rubenerd/1ebf8d27edba68b1ee9d to your computer and use it in GitHub Desktop.
Multiuser Mac brew and brew cask
#!/bin/sh
## Script to allow multiple user access for Homebrew and Homebrew Casks
##
## Assumes:
## * "brew" group created in System Preferences, with users added
## * homebrew installed with your Administrator account
##
## FWIW, you may only want your Administrator to install and use! In which case,
## install as normal.
## Install homebrew as your Administrator (not daily) account
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
## Elevate ourselves for assigning permissions
sudo -s
## Folder for homebrew-cask (and my dev stuff)
mkdir /opt
## Change group to brew
chgrp -R brew /usr/local
chgrp -R brew /opt
chgrp -R brew /Library/Caches/Homebrew
## Allow writes from brew group
chmod -R g+w /usr/local
chmod -R g+w /opt
chmod -R g+w /Library/Caches/Homebrew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment