-1

I was a happy guy until when, accidentally, I did this command in my Mac Os X (Yosemite 10.10.5) a few moments a go:

$ sudo chown -R my.user:staff usr/

Then, terribly, when I try to use sudo a horrible error occurs:

$ sudo su -
sudo: effective uid is not 0, is sudo installed setuid root?

Any one have any idea about how to solve these and save my life, please?

Obs: I can't open new terminals but I still have two terminals opened, one logged with my.user and other with root.

4
  • Restore /usr from a Time Machine backup? Commented Mar 23, 2017 at 18:46
  • Either restore from backup or reinstall the OS.
    – Barmar
    Commented Mar 23, 2017 at 18:49
  • BTW, StackOverflow is for programming questions, not questions about using your PC/Mac.
    – Barmar
    Commented Mar 23, 2017 at 18:50
  • Unfortunately I don't have a backup :( Commented Mar 23, 2017 at 19:04

2 Answers 2

2

Maybe if you changed the owner to actually used by you user, you can change without sudo the ownership to root by chown -R root:root /usr?

3
  • root# chown -R root:root /usr >>> chown: root: illegal group name Commented Mar 23, 2017 at 19:01
  • 2
    @JohnSmith I checked and in macOS the groupname for root is named wheel so you need to execute chown -R root:wheel /usr Commented Mar 23, 2017 at 19:12
  • Using wheel as the root user was what worked for me. Thanks sir for saving me a new installation
    – John
    Commented Apr 9, 2018 at 18:24
1

I found this tutorial and it saved me from ruin:

  1. Open Disk Utility, which is in the Utilities folder of your Applications folder.
  2. Select the startup disk from the list of volumes.
  3. Click the First Aid tab.
  4. To check permissions, click Verify Disk Permissions. To repair permissions, click Repair Disk Permissions.

https://support.apple.com/en-us/HT201560

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.