Skip to content

In diagnostics, when directory is not writable, also hint to set permission.#5911

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
blankenberg:user-dir-write-permission
Mar 23, 2019
Merged

In diagnostics, when directory is not writable, also hint to set permission.#5911
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
blankenberg:user-dir-write-permission

Conversation

@blankenberg
Copy link
Copy Markdown
Contributor

@blankenberg blankenberg commented Mar 23, 2019

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

I don't want to admit how long it took me to notice the actual permission problem (/facepalm) with my (/user/local/sbin) directory, but it was preventing install of qemu, and I hope this will help the next person (who might be me again):

Warning: The following directories are not writable by your user:
/usr/local/sbin

You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /usr/local/sbin

And make sure that your user has write permission.
  chmod u+w /usr/local/sbin

@blankenberg
Copy link
Copy Markdown
Contributor Author

Please let me know if there is something I should do for the failing test, but it looks unrelated, to me at least:

...
Step 9/9 : RUN HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/core 	&& chown -R linuxbrew: /home/linuxbrew/.linuxbrew 	&& rm -rf ~/.cache
 ---> Running in 90b2fc031c0c
Error: ‌Running Homebrew as root is extremely dangerous and no longer supported.‌
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Service 'sut' failed to build: The command '/bin/sh -c HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/core 	&& chown -R linuxbrew: /home/linuxbrew/.linuxbrew 	&& rm -rf ~/.cache' returned a non-zero code: 1‌
##[error]Bash exited with code '1'.``

@blankenberg
Copy link
Copy Markdown
Contributor Author

I see the tests are now passing (sweet) due to an upstream change, but it is possible that #5915 may have provided an alternative solution as well.

Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @blankenberg!

@MikeMcQuaid MikeMcQuaid merged commit 4cb88b7 into Homebrew:master Mar 23, 2019
@blankenberg blankenberg deleted the user-dir-write-permission branch March 23, 2019 21:57
@lock lock bot added the outdated PR was locked due to age label Apr 22, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants