After upgrading from OS X Yosemite to OS X El Capitan Developer Preview, I tried to edit /System/Library/LaunchDaemons/ssh.plist to change the default SSH port to a custom one. This is the process I've been using for a couple of years.
The problem is that El Capitan doesn't allow me to change anything in this folder (not even with "sudo"). The folder and its files are marked as "restricted" when I list the contents with "ls -lO". The same folder listing in previous versions of OS X does not show "restricted".
Is this something new to OS X El Capitan? How can I edit files/folders that are "restricted"?
I found out this is due to a new feature introduced in El Capitan called "SIP" (System Intregrity Protection).
Read more here: https://forums.developer.apple.com/thread/4731?q=SIP
Unfortunately, no one suggested a way of editing "restricted" files/folders without actually disabling SIP.
You can also temporarily disable SIP the following way
csrutil disable
csrutil enable