5 ms·
> Disable running Homebrew as the root user (e.g. sudo brew) why? Just curious, because I always use macports with sudo.
by favadi 10y ago
> Disable running Homebrew as the root user (e.g. sudo brew)
why? Just curious, because I always use macports with sudo.
- hkmix 10y agoI assume it's because 1) it's not really needed, and 2) it prevents shady packages from executing scripts as root.
- creshal 10y agoIIRC because it could cause problems with overwriting system libraries in earlier versions, so it has long been deprecated.
- mikemcquaid 10y agoWe 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.
- Spivak 10y ago> We don't drop privileges when building So why did you choose to disable running as root altogether rather than dropping privileges when building?
- mikemcquaid 10y agoUsing 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.