Last active
January 4, 2025 01:23
-
Star
(205)
You must be signed in to star a gist -
Fork
(49)
You must be signed in to fork a gist
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Configure homebrew permissions to allow multiple users on MAC OSX. | |
| # Any user from the admin group will be able to manage the homebrew and cask installation on the machine. | |
| # allow admins to manage homebrew's local install directory | |
| chgrp -R admin /usr/local | |
| chmod -R g+w /usr/local | |
| # allow admins to homebrew's local cache of formulae and source files | |
| chgrp -R admin /Library/Caches/Homebrew | |
| chmod -R g+w /Library/Caches/Homebrew | |
| # if you are using cask then allow admins to manager cask install too | |
| chgrp -R admin /opt/homebrew-cask | |
| chmod -R g+w /opt/homebrew-cask |
@Blackjacx I am on Big Sur and this is mostly working for me, but I have to reset permissions every now and then after upgrading.
It seems that this method might be better, any reason it may be less desirable?:
https://unix.stackexchange.com/a/714797/47012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All of this doesn't work on macOS BigSur. Only the user who installed all the Homebrew stuff is able to upgrade them afterwards. For all the other users the system complains with
Operation not permittedsince th folder belongs to the other user. It seems like Homebrew does not respect the groups write permission and only looks for the user... :(