Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

[El Capitan beta 2] brew update error: unable to unlink old 'README.md' (Permission denied) #41150

Closed
simonwhitaker opened this issue Jun 28, 2015 · 8 comments
Labels

Comments

@simonwhitaker
Copy link
Contributor

$ brew update
error: unable to unlink old 'README.md' (Permission denied)
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
$ brew --version
0.9.5
@DomT4
Copy link
Member

DomT4 commented Jun 28, 2015

What does ls -lh $(brew --prefix) say?

@lloeki
Copy link
Contributor

lloeki commented Jun 29, 2015

My bet is on ls -ld $(brew --prefix), which will probably show it's owned by root instead of the user (unlinking is a directory operation).

@simonwhitaker
Copy link
Contributor Author

Correct, it showed /usr/local/ owned by root. That appears to have changed on installing 10.11 beta 2, I'm pretty sure I used brew without issue on beta 1.

(To be clear, I'm not suggesting this is a bug in Homebrew, just giving you a heads-up in case it turns out to be a systemic issue with 10.11 rather than a glitch in the latest beta.)

@lloeki
Copy link
Contributor

lloeki commented Jun 29, 2015

This is systemic, as the OS X installer does it. Yosemite did that too. Also, brew doctorpoints it out.

@DomT4
Copy link
Member

DomT4 commented Jun 29, 2015

Strange. I updated my VM from 10.11 DP1 to DP2 the other night and haven't had any issues with /usr/local being reclaimed. Can you sudo chown -R it back to you?

@GuamBomb
Copy link

Could have something to do with "rootless," the new security feature. I keep finding little things broken by it. To disable it, you can use the command <sudo nvram boot-args="rootless=0"> and then reboot. To turn it back on, you change that 0 to a 1 and reboot again.

@DomT4
Copy link
Member

DomT4 commented Jun 30, 2015

We're trying to work with rootless, rather than around it.

For better or worse we have to assume users will have rootless enabled and them doing so actually should reduce the amount of Issues Homebrew fields when people do things like symlinking Homebrew's LLVM over the system one, removing the Python in /usr/bin, changing plists in /System and so on.

/usr/local is supposed to be available to developers under rootless, per Apple's announcement.

@DomT4
Copy link
Member

DomT4 commented Jul 6, 2015

Moving to tracking in #40837.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants