Resolve Mac OS X 11 unable to copy file problem
1. After upgrading Mac OS X 11, you want the copy file to the system directory.
Sudo cp-f test.txt / usr/bin/
2. It is found that there is a permission problem even if the permission sudo is used.
Cp: / usr/bin/test: Operation not permitted
3. The reason is that El Capitan has joined the Rootless mechanism after upgrading Mac OS X 11, so it is no longer possible to edit any path at will, even if you set root permissions.
The ps:Rootless mechanism is used to resist malicious programs.
4. For copies under the bin directory, the Rootless mechanism needs to be turned off.
5. Restart and hold down Command+R to enter recovery mode.
6. Then open Terminal and type: csrutil disable.
Ps: when you don't need it, you can turn it on again by csrutil enable. After all, it's a protection mechanism.