V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
cruii
V2EX  ›  程序员

不小心执行了 chmod 777 -R

  •  
  •   cruii · Dec 25, 2019 · 4088 views
    This topic created in 2321 days ago, the information mentioned may be changed or developed.
    今天没有注意所在目录直接敲了个 chmod 777 -R
    把 /usr/local/下的目录全改了
    有没有办法弄回去啊,看着好难受啊
    8 replies    2019-12-25 20:09:00 +08:00
    julyclyde
        1
    julyclyde  
       Dec 25, 2019
    /usr/local 都是自己编译的内容
    你重新编译一遍就行了
    cruii
        2
    cruii  
    OP
       Dec 25, 2019
    系统是 macOS 10.15.2
    index90
        3
    index90  
       Dec 25, 2019
    拿别人的系统,对着重新设一遍
    lrvy
        4
    lrvy  
       Dec 25, 2019   ❤️ 6
    haozxuan001
        5
    haozxuan001  
       Dec 25, 2019
    我理解,改大了好像并不会影响什么
    263
        6
    263  
       Dec 25, 2019
    目录
    find /usr/local -type d -exec chmod 755 {} \;

    文件
    find /usr/local -type f -exec chmod 644 {} \;

    可执行
    find /usr/local -type f -name "*.sh" -exec chmod +x {} \;
    hualuogeng
        7
    hualuogeng  
       Dec 25, 2019
    @haozxuan001 安全
    laibin6
        8
    laibin6  
       Dec 25, 2019 via iPhone
    mac 不是还有加个 sudo 才行吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2496 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 72ms · UTC 12:09 · PVG 20:09 · LAX 05:09 · JFK 08:09
    ♥ Do have faith in what you're doing.