• 请不要在回答技术问题时复制粘贴 AI 生成的内容
cruii
V2EX  ›  程序员

不小心执行了 chmod 777 -R

  •  
  •   cruii · Dec 25, 2019 · 4488 views
    This topic created in 2515 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
    julyclyde
    Dec 25, 2019
    1
    /usr/local 都是自己编译的内容
    你重新编译一遍就行了
    cruii
    cruii
    OP
    Dec 25, 2019
    2
    系统是 macOS 10.15.2
    index90
    index90
    Dec 25, 2019
    3
    拿别人的系统,对着重新设一遍
    haozxuan001
    haozxuan001
    Dec 25, 2019
    5
    我理解,改大了好像并不会影响什么
    263
    263
    Dec 25, 2019
    6
    目录
    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
    hualuogeng
    Dec 25, 2019
    7
    @haozxuan001 安全
    laibin6
    laibin6
    Dec 25, 2019 via iPhone
    8
    mac 不是还有加个 sudo 才行吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1957 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 01:05 · PVG 09:05 · LAX 17:05 · JFK 20:05
    ♥ Do have faith in what you're doing.