V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zhujinliang
V2EX  ›  macOS

El Captian sudo 也不能改/usr/bin 之类的目录了,有什么办法解决么

  •  
  •   zhujinliang · 2015-07-11 10:31:22 +08:00 · 4183 次点击
    这是一个创建于 3429 天前的主题,其中的信息可能已经有所发展或是发生改变。
    vi,php之类的某些原因要替换系统自带的版本

    -------------
    刚才发现一个办法,/usr/local/bin还是可以操作的,改了PATH变量,把/usr/local/bin放在了最前面

    sudo也不让改/usr/bin总觉得怪怪的啊
    9 条回复    2015-10-15 17:02:36 +08:00
    zhjits
        1
    zhjits  
       2015-07-11 11:30:22 +08:00   ❤️ 1
    sudo nvram boot-args="rootless=0"

    然而据说正式版本这东西也会失效,所以……

    话说替换系统版本为啥不直接用 homebrew 呢
    wkdhf233
        2
    wkdhf233  
       2015-07-11 12:12:57 +08:00
    这是准备做成iOS的节奏么,这么搞估计以后OS X也可以越狱了。。
    ffffwh
        3
    ffffwh  
       2015-07-11 15:12:20 +08:00   ❤️ 1
    其实吧,那个拼作capitan..
    另外我原先以为是captain...
    sobigfish
        4
    sobigfish  
       2015-07-11 17:15:25 +08:00
    brew, phpbrew 可以不?
    os x 10.11 是说权限被限制的很厉害,都不打算升了
    jedihy
        5
    jedihy  
       2015-07-11 23:25:10 +08:00 via iPhone
    硬盘拆下来改
    crystone
        6
    crystone  
       2015-07-11 23:35:16 +08:00
    有限制也是好处
    geekdada
        7
    geekdada  
       2015-07-12 16:42:29 +08:00   ❤️ 1
    http://arstechnica.com/apple/2015/06/preview-os-x-el-capitans-first-beta-is-a-promising-heap-of-refinements/4/

    以下为引用:

    System Integrity Protection, also called "rootless," is a new system security feature that prevents the user or any process from writing in system-protected folders. This list includes /System, /bin, /usr (but not /usr/local), and /sbin. Not even administrators can add to these folders or edit files that are in them, though they retain their access to the rest of the files on the drive. That's one way to protect important operating system files from external tampering!

    If you never dive into any of those folders, you won't notice the difference in day-to-day usage. If you do, reboot into your El Capitan Mac's recovery partition. There's a new item under the Utilities menu that will let you toggle System Integrity Protection on and off for El Capitan volumes. That's all it does. So we're not looking at an iOS-esque level of system lockdown just yet, though there are no promises that System Integrity Protection won't become mandatory in some future version of OS X.
    uuapp
        8
    uuapp  
       2015-10-15 17:01:56 +08:00
    执行
    sudo chown -R $(whoami):admin /usr/local
    homebrew 等 使用正常
    uuapp
        9
    uuapp  
       2015-10-15 17:02:36 +08:00
    sudo chown -R $(whoami):admin /usr/bin
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1198 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:32 · PVG 02:32 · LAX 10:32 · JFK 13:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.