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

brew.sh: disable running Homebrew as root. #1452

Merged
merged 1 commit into from Nov 6, 2016

Conversation

Projects
None yet
4 participants
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Nov 6, 2016

November 1st 2016 has come and gone so it's time to disable this.

Also, add comments explaining why the things that have been whitelisted have been (to avoid more being added without good justification).

brew.sh: disable running Homebrew as root.
November 1st 2016 has come and gone so it's time to disable this.

Also, add comments explaining why the things that have been whitelisted
have been (to avoid more being added without good justification).
@adidalal

This comment has been minimized.

Copy link
Member

adidalal commented Nov 6, 2016

Homebrew Cask also shouldn't be run with sudo, FWIW. But we do call .pkg installs and overwrite .app bundles if the --force flag is given, which may use sudo.

If this PR doesn't block that behavior, then I don't know that HBC even needs that exception (sudo brew cask is not supported).

Haven't poked around the core code too much, @reitermarkus or @jawshooah may be able to confirm.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Nov 6, 2016

@adidalal I've previously used it when I want to call from a script and not have it prompt for sudo access.

@MikeMcQuaid MikeMcQuaid merged commit 586b35f into Homebrew:master Nov 6, 2016

4 checks passed

codecov/patch Coverage not affected when comparing ce2b11f...eabdbde
Details
codecov/project 60.61% (+0.00%) compared to ce2b11f
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
default Build finished.
Details

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:disable-root branch Nov 6, 2016

@MikeMcQuaid MikeMcQuaid removed the in progress label Nov 6, 2016

@reitermarkus

This comment has been minimized.

Copy link
Member

reitermarkus commented Nov 6, 2016

I've previously used it when I want to call from a script and not have it prompt for sudo access.

This will make cache files, Caskroom sub-directories, and all other files that are extracted/copied root-owned, so you shouldn't do that.

Therefore, as @adidalal said,

sudo brew cask is not supported

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Nov 7, 2016

@reitermarkus 🆒, will 👍 a PR that removes it. What's the "correct" way to handle what I mentioned?

@pataar

This comment has been minimized.

Copy link

pataar commented Nov 8, 2016

Question: Will this also stop me from using sudo brew services restart httpd24 for example?
Still supporting sudo brew services. Awesome :)

@Homebrew Homebrew locked and limited conversation to collaborators Nov 8, 2016

@reitermarkus

This comment has been minimized.

Copy link
Member

reitermarkus commented Nov 8, 2016

What's the "correct" way to handle what I mentioned?

I don't know if there is such a thing as the "correct" way for sudo.

I had been using a variation on https://gist.github.com/cowboy/3118588 in my dotfiles, but as you can see from my comment over there, I recently had to move to this, due to this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.