Hacker News new | ask | show | jobs
by cdonnellytx 3912 days ago
The problem is even _root_ can't add the missing /usr/local, because SIP prevents even root from touching /usr. SIP doesn't block /opt; if it did, MacPorts would also have broken, sudo or no sudo.
2 comments

SIP doesn't block /opt for the exact reason MacPorts relies on /opt: It's not part of the existing operating system. In other words, this situation isn't just good luck for MacPorts, it's a direct result of the design decisions behind MacPorts, and the design decisions behind homebrew.
> The problem is even _root_ can't add the missing /usr/local, because SIP prevents even root from touching /usr.

This goes against all that I have read and my own experiences with the betas. Maybe Apple changed something last minute. See here: http://www.macworld.com/article/2948140/os-x/private-i-el-ca...

The specifics of System Integrity Protection are that no user, application, or process will be able to write files or modify files in the root System folder or the /bin, /sbin, and /usr directories, which are hidden by default in OS X’s Finder. The /usr/local folder remains accessible, however; it’s a long-running convention in Unix and variants as a place to stash material and software that individual users rely on.

The bit you quoted doesn't contradict what the OP stated, if /usr/local _does not_ exist, not even root can create it.

If it exists, we can use it as before.

Considering how many times I've installed OS X, I can't recall if /usr/local is there by default (excluding 10.11 for the moment). Will have to do another few installs and check.

I can confirm that /usr/local is there by default on a clean install of El Capitan
On my Yosemite system /usr/local was created by default when the OS was installed.