IndiaReply Logo Indiareply
Sign In Sign Up
  • Home
  • Popular
  • Explore
  • All
    • Loading...

Tell us about your community

i/communityname

Your community description

Info
Install our Android app to unlock all features.
i/MacOS
Chat About

Community Information

i/macos

  • shubham_mishra

    •

    5 months

    Multi-user homebrew setup using additional homebrew user

    I have two users that I switch between, and I want to use `brew` on both of them. So I created a new user called `homebrew`, and then added these lines to my `~/.zshrc` files on both users: ``` unalias brew 2>/dev/null alias brew='sudo -Hu homebrew brew' eval "$(/opt/homebrew/bin/brew shellenv)" fpath+=("/opt/homebrew/share/zsh/site-functions") ``` This works quite well, except that it only allows me to run `brew` from `~`. If I try and run it from say `~/Documents` then I get this error: ``` shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied Error: $PWD must be set to run brew. ``` I know this can be fixed by adding the `-i` flag to the `alias brew`, but this creates a new login shell which is a bit heavy and thus not ideal. Is there any other solution? I would rather not make sweeping changes to folder permissions. Maybe it is fine to fix the ACL/perms problem such that the `homebrew` user (i.e., "others") has execute permissions from my working directory's path. I did try `chmod o+x /Users/work` and `chmod o-r /Users/work`, but this does not override the ACL. Thanks <3
    2

© 2025 Indiareply.com. All rights reserved.

All Groups
    • Loading...
RECENT POSTS
Clear
    Loading...
New notification
Message icon
a few seconds ago

Sign in to our platform

Lost Password?
Not registered? Create account