pivotal / workstation-setup

Scripts to automatically set up a machine for development the "Tanzu Labs" way
https://github.com/pivotal/workstation-setup
MIT License
328 stars 247 forks source link

sentinelctl: you don't chown me #240

Closed textbook closed 5 years ago

textbook commented 5 years ago

Running the setup script on a clean MBP (Retina, 13-inch, Early 2015, macOS Mojave), I got the following error:

chown: /usr/local/bin/sentinelctl: Operation not permitted

The problem is in homebrew.sh:

sudo chown -R $(whoami) /usr/local/bin

The Sentinel executable is owned by root, so my user can't chown it; I'd guess this will affect other Pivots too.

professor commented 5 years ago

If you comment out that line, does everything else work with workstation-setup? Maybe we no longer need to make sure that brew can write to /usr/local/bin. Thoughts?

textbook commented 5 years ago

Yep; that's what I did, and everything else seems to be working OK. It's possible that step is redundant.

Kehrlann commented 5 years ago

I have the same problem on (2015 MBP, High Sierra). I had a PR for this, basically chown'ing the whole directory but sentinelctl, something along those lines:

shopt -s extglob
sudo chown -R $(whoami) /usr/local/bin/!(sentinelctl)
shopt -u extglob

Shall we get rid of this chowning altogether ?

textbook commented 5 years ago

The other option is to set -f and assume that chowning everything it can is good enough. Based on some of the threads on Homebrew/brew it could be:

sudo chown -Rf $(whoami) $(brew --prefix)/*