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.
Answer
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
No comments:
Post a Comment