问题描述
我正在尝试将某些东西移至OS X El Capitan上的/usr/bin .我已使用以下命令禁用了无根用户: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 .然后进入实用程序>终端,然后输入以下命令:
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(已禁用无根)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!