Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does "You may now chown /usr/local back to root:wheel" and what should I do? #1023

Closed
KMamedoff opened this issue Sep 19, 2016 · 15 comments

Comments

@KMamedoff
Copy link

It is shown after I updated Homebrew.

@zmwangx
Copy link
Member

zmwangx commented Sep 19, 2016

Well, exactly as said "you may now chown /usr/local back to root:wheel".

@zmwangx
Copy link
Member

zmwangx commented Sep 19, 2016

Congratulations on a successful migration.

@KMamedoff
Copy link
Author

Yes but I don't know how to do that.

@zmwangx
Copy link
Member

zmwangx commented Sep 19, 2016

sudo chown root:wheel /usr/local

You don't have to do that though, it just doesn't matter anymore.

@KMamedoff
Copy link
Author

I did it anyway. Thank you.

@pbregener
Copy link

I just got the same message. While I do know how to do it, it'd like to know why. Was the owner changed in the migration process? And as it says "may", I assume it's not necessary?

@pbregener
Copy link

Thanks @zmwangx. Can you provide some more background? Why is that message shown and why is it so ambiguous?

@zmwangx
Copy link
Member

zmwangx commented Sep 19, 2016

@pbregener Homebrew used to require writing access to /usr/local. Now it no longer writes to /usr/local, only subdirectories of /usr/local.

Was the owner changed in the migration process?

No, but Apple likes seeing /usr/local being owned by root:wheel, and major macOS upgrades do that.

And as it says "may", I assume it's not necessary?

It's not.

@pbregener
Copy link

Thanks for the quick reply and good and short explanation @zmwangx 👍

MikeMcQuaid added a commit that referenced this issue Sep 19, 2016
@MikeMcQuaid
Copy link
Member

Improved this message in a2f19f0

@kevwil
Copy link

kevwil commented Sep 19, 2016

Would it be accurate to say the user still needs to own some/most/all folders under /usr/local? I'm just curious what the "correct" permission set looks like, if such a perspective even exists.

@MikeMcQuaid
Copy link
Member

@kevwil Yep. Those folders are checked for you though (and not reset by Apple on updates).

@dmofot
Copy link

dmofot commented Sep 19, 2016

Just throwing this here in case somebody else runs into the issue. I ran sudo chown root:wheel #{HOMEBREW_PREFIX} and everything appeared fine. Then ran brew cask list which returned

$ brew cask list
==> Moving Caskroom from HOMEBREW_REPOSITORY to HOMEBREW_PREFIX
Error: Permission denied - (/usr/local/Homebrew/Caskroom, /usr/local/Caskroom)Most likely, this means you have an outdated version of Homebrew-Cask. Please run:

    brew uninstall --force brew-cask; brew untap phinze/cask; brew untap caskroom/cask; brew update; brew cleanup; brew cask cleanup

If this doesn’t fix the problem, please report this bug:

    https://github.com/caskroom/homebrew-cask#reporting-bugs

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `rename'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `block in mv'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1558:in `block in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1574:in `fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1556:in `fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:508:in `mv'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/caskroom.rb:8:in `migrate_caskroom_from_repo_to_prefix'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc.rb:52:in `init'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:146:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:105:in `<main>'

Needed to run sudo brew cask list due to the new permissions:

$ sudo brew cask list
Password:
==> Moving Caskroom from HOMEBREW_REPOSITORY to HOMEBREW_PREFIX

And now everything works fine without having to resort to sudo again.

@hmijail
Copy link

hmijail commented Sep 26, 2016

This was messy and is getting messier. Maybe it would be good if the Homebrew devs published a FAQ: "up to version X we did this because of blah1, but since version Y the recommended practice is Z, because of blah2".

@MikeMcQuaid
Copy link
Member

@hmijail We'll consider that in future but not at present.

@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants