0

So there I was innocently trying to update Homebrew on my Macbook Pro, and I'm a normal-to-experienced computer user, not afraid of the ol' command line but I'm not a super under-the-hood wiz kid genius type, and after I typed "brew update" in iTerm2 there was a message. It said I ought to run:

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

So I thought hmm OK well Homebrew wouldn't lie let's run that bad boy. So I ran it and there was an alarmingly lengthy series of chown-related messages zipping down the iTerm2 window, which seemed to be changing ownership of just about every single thing on my computer, many of which triggered popups that required my permission, which, hey, I granted, in for a penny in for a pound.

And everything seemed OK at first when it finally ended. But then I tried to create a new local MySQL database and it "could not create" it. Odd. So I thought well, ownerships have changed, there must be a conflict of some kind, maybe restarting the computer might help. So I did that.

It took a long time to restart.

And now I've got serious problems. Many things don't work. So far MAMP Pro won't open, my local apache and mysql are down, the Mail program is having serious problems for some reason, and that's just in the first five minutes. I assume something has gone terribly wrong with the permissions structure of my file system.

Is anything about this situation obvious to anyone? Is there something seriously wrong with the chown command I used? Could it for example be that space after the first forward slash before usr, which suddenly looks very suspicious to me? Advice?

2
  • Did you copy/paste the command, or type it in? They almost certainly recommended sudo chown -R $(whoami) /usr/local/Homebrew - note the lack of a space between / and usr. You will likely have to reinstall your OS from scratch, as this will have broken many, many things.
    – ceejayoz
    Commented Dec 8, 2023 at 13:10
  • Thanks -- I did copy/paste it, so I think the space must have been there in the instruction by accident. Argh. Commented Dec 8, 2023 at 13:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.