I tried to install a program and it alwaysed lacked permission on /usr/local. I tried sudo chown -R $USER /usr/local but then found out that doesn't work anymore with High Sierra. So I tried sudo chown -R $(whoami) $(brew --prefix)/* . That brought an awful lot of "Operation not permitted" in the terminal.

After that I wanted to install again with sudo. Then an error message showed sth like "sudoers uid is 501 should be 0" (cant exactly remember it)

Then I tried to restart the mac, but it never did... Just black screen. I heard the starting sound once or twice, but it never booted again or showed anything on the screen. Anyone any idea what happend and how to fix it?


1 Answer 1


It sounds like you mistyped the command or had problems with your brew command, making the chown apply to not only /usr/local but rather / - i.e. the whole system. The command you have written is actually relatively dangerous, as you're relying on "brew --prefix" to output the right thing.

In this case your command changed the owner of system files, such as the /etc/sudoers file. This is why the system won't boot anymore.

The good news is that you should be able to boot the Mac in Recovery Mode by holding down Cmd and R while booting. From there you should be able to select that you want to reinstall macOS on your computer. This should allow you to overwrite those system files and ensure that the system is good to boot, while keeping your own files intact. If you have done any changes to the system files, you'll loose those ofcourse.

  • Oh ok. Thank you very, yes I could reboot it in recovery mode and its reinstalling right now. Thanks a lot! Jun 13, 2019 at 20:51

You must log in to answer this question.

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