Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Disable running Homebrew as the root user (e.g. sudo brew)

why? Just curious, because I always use macports with sudo.



We don't drop privileges when building (as we're not designed to run as root) and the macOS sandbox has issues with the root user so unfortunately you're giving every package you install root access to write to (almost) anywhere on your system. This is bad so we've stopped it.


> We don't drop privileges when building

So why did you choose to disable running as root altogether rather than dropping privileges when building?


Using the root user like this is used by a tiny minority of our users. The deprecation notice noted we'd happily accept a PR that implemented the privilege dropping but one never came. In a world where Homebrew is run by a full-time, paid staff we'd likely have implemented it but there's too much other, more important stuff that needs done by our understaffed team.


I assume it's because 1) it's not really needed, and 2) it prevents shady packages from executing scripts as root.


IIRC because it could cause problems with overwriting system libraries in earlier versions, so it has long been deprecated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: