使用 root 时不允许操作 - El Capitan(无根禁用) [英] Operation Not Permitted when on root - El Capitan (rootless disabled)
问题描述
我正在尝试将某些内容移动到 OS X El Capitan 上的 /usr/bin.我使用以下命令禁用了 rootless: sudo nvram boot-args="rootless=0";sudo reboot
,但我不断收到相同的错误:
I am trying to move something to /usr/bin on OS X El Capitan. I have disabled rootless using the following commands: sudo nvram boot-args="rootless=0"; sudo reboot
, but I keep getting the same error:
MacBook-Air:~ Mark$ sudo cp class-dump /usr/bin
Password:
cp: /usr/bin/class-dump: Operation not permitted
MacBook-Air:~ Mark$ sudo mv class-dump /usr/bin
mv: rename class-dump to /usr/bin/class-dump: Operation not permitted
推荐答案
Nvm.对于遇到此问题的其他人,您需要重新启动 Mac 并在启动时按 ⌘+R.然后进入 Utilities > Terminal 并输入以下命令:
Nvm. For anyone else having this problem you need to reboot your mac and press ⌘+R when booting up. Then go into Utilities > Terminal and type the following commands:
csrutil disable
reboot
这是系统完整性保护的结果.更多信息请此处.
This is a result of System Integrity Protection. More info here.
编辑
如果您知道自己在做什么并且习惯于运行 Linux,那么您应该使用上述解决方案,因为许多 SIP 限制完全是个麻烦.
If you know what you are doing and are used to running Linux, you should use the above solution as many of the SIP restrictions are a complete pain in the ass.
但是,如果您是 tinkerer/noob/"poweruser" 并且不知道自己在做什么,这可能非常危险,最好使用 下面的答案.
However, if you are a tinkerer/noob/"poweruser" and don't know what you are doing, this can be very dangerous and you are better off using the answer below.
这篇关于使用 root 时不允许操作 - El Capitan(无根禁用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!