2

I have a weird situation. I’m using Mac OS X 10.11 (El Capitan) and iTerm2.

Zsh is listed by default in /etc/shells as /bin/zsh, and this allows me to use Zsh without any issues on my standard account.

However, when I brew install Zsh and then use chsh or System Preferences -> User Groups -> etc, I get a login: /usr/local/bin/zsh: Permission denied error. This is after adding /usr/local/bin/zsh to /etc/shells.

I have run into the same problem with Fish, which is actually the shell I would prefer to be using. Now, I can use the shell without any issues when I su to an account with administrator access, but I can’t use these shells on my standard account.

As I mentioned earlier, the paths are added to /etc/shells and I have set the permissions to 755, but I still am having no luck.

Am I doing something wrong here? Or must I simply use an admin account in order to take advantage of these shells?

This is really disappointing, because I appreciate the heightened security of working in a standard account, but it sucks not being able to get the best shells outside of my admin account.


I want to emphasize that I am able to get Zsh working on my standard account only when using the path that is set by default, which is /bin/zsh in /etc/shells. This makes me question if there is some issue with the path being in /usr/local/bin/zsh.

However, this is the default, so I am wondering if there are others who are using a standard account with fish or a brewed zsh with success.

I have found little to no documentation on this.

4
  • I am looking to run fish/zsh as my default shell
    – badfilms
    Commented Oct 10, 2015 at 6:20
  • Also, from what I understand, the syntax that you suggested is no longer valid in OS X. It is the native Linux command. The OS X command is now chsh -s $SHELL
    – badfilms
    Commented Oct 10, 2015 at 6:26
  • I just included $SHELL as a stand-in for a generic shell. When I use the command in El Capitan, it gives me a usage error
    – badfilms
    Commented Oct 10, 2015 at 7:00
  • I stand corrected. It appears to work just fine (when changing to bash). However, when I do the following: chsh -s $(which fish) or chsh -s $(which zsh) I get this: usage: chpass [-l location] [-u authname] [-s shell] [user]
    – badfilms
    Commented Oct 10, 2015 at 7:03

1 Answer 1

0
+100

Is your Homebrew set up for multiple users? If not, take a look at this simple explanation: http://blog.strug.de/2012/06/my-homebrew-multi-user-setup/.

If it is, then make sure brew doctor shows good for each user you intend to give access to brew.


If you don't want it set up for multiple users, and you only want zsh and fish to work for multiple users, then you'll have to do some manual permissions fiddling.

Homebrew doesn't install to /usr/local. "Homebrew installs packages to their own directory and then symlinks their files into /usr/local." So 755 perms on /usr/local/bin/fish are useless. In fact, the simlinks should be set to 777.

You'll need to follow the links and set 755 on the actual executables instead. Also, be sure that all dirs leading to the simlinks are set to +x so that others can see the simlinks.

The above quote is from Homebrew's website: brew.sh

3
  • I went through the above regarding setting up Homebrew to work across multiple accounts, however, I had no success getting it to work on my standard account despite following the instructions verbatim
    – badfilms
    Commented Oct 13, 2015 at 18:01
  • Steps 4 and 6 of the guide add write perms for all brew users. Since you had Homebrew for a while before trying this, you may need to also add read and/or execute perms during those steps. If that doesn't work, I recommend using the second part of my answer to manually set perms on the shells you want to share. Once you're current problem is fixed, you can go back and decided how much you want to put into making Homebrew work for multiple users. Commented Oct 13, 2015 at 20:36
  • Perfect. Once I changed permissions to +x for /Cellar I was golden. brew is now working across both accounts as well as fish. Thanks Tyler
    – badfilms
    Commented Oct 14, 2015 at 7:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .