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

MBP 重启后无法操作!紧急求助!

  •  
  •   tzhhahaha · 2020-07-03 11:34:07 +08:00 · 1578 次点击
    这是一个创建于 1390 天前的主题,其中的信息可能已经有所发展或是发生改变。

    楼主昨天电脑一直弹窗 xxx 找不到钥匙串, 然后今天开发的时候老是弹窗, 然后我就重启了,这下可好, 我所有的操作都会卡顿,后来我把软件都关了,重启了, 还是没用, 所有操作, 包括点击左上小苹果, 都开始转圈圈。 同时之前关机的时候显示 xxx 文档我没有权限, 很不正常。

    今天还很多活没干完呢。。。有碰见过这种情况吗???

    所有操作, 包括使用快捷搜索,都会开始转圈圈。。。

    硬要说做了什么操作的话, 我昨天尝试给 /var/log/xxx 赋权, 然后 xxx 找不到钥匙串貌似是在我删了好几个老的 wifi 密码后出现的,但是我应该没错删其他的,就是一排老的 wifi 热点挑了几个

    这种情况我是不是要旗舰店走一波维修了。。。

    第 1 条附言  ·  2020-07-03 15:46:29 +08:00
    楼主不小心命令用错了。。。


    sudo chown -777 /var/*


    导致 操作系统完全无法使用。。。能进系统,点击任意文件都转圈圈。。。


    1. 老用户无法打开各种软件, 无法 sudo
    2. 建新用户可以打开一些软件,某些软件卡顿,直接无响应。。。


    结论:
    重装系统。。。
    time machine 一定弄。。。
    不要像我一样手抽脑抽
    20 条回复    2020-07-03 16:39:01 +08:00
    lcdtyph
        1
    lcdtyph  
       2020-07-03 11:39:01 +08:00
    你不会是 sudo chmod -R 或者 sudo chown -R 了吧?
    tzhhahaha
        2
    tzhhahaha  
    OP
       2020-07-03 11:41:11 +08:00
    @lcdtyph 是的。。。但是我加了具体文件的啊。。。你这么说。。。我看看。。。要咋解决啊。。。
    lvsshuttao
        3
    lvsshuttao  
       2020-07-03 11:54:36 +08:00
    以后记得要做好 time merchine 备份
    tzhhahaha
        4
    tzhhahaha  
    OP
       2020-07-03 11:55:33 +08:00
    @lvsshuttao 这个要咋解决啊。。。 我还没搞明白
    lvsshuttao
        5
    lvsshuttao  
       2020-07-03 12:03:51 +08:00
    你看下能不能恢复回去咯(没试过,不对任何结果负责)
    我 ll /var/log 看了下,在我电脑上,目录文件大部是 root:wheel,还有一些 xxx.log.xxx.gz 用户是 root:用户名
    tzhhahaha
        6
    tzhhahaha  
    OP
       2020-07-03 12:05:41 +08:00
    @lvsshuttao 主要我没搞懂现在是为啥。。。感觉改 /var/log 也不会这样子。。。很懵逼
    tzhhahaha
        7
    tzhhahaha  
    OP
       2020-07-03 12:09:09 +08:00
    @lvsshuttao
    @lcdtyph
    我好像看到为啥了。。。
    我执行了
    sudo chown -R 777 /var/*

    请问这个要咋办啊。。。能帮我看看本来都是啥吗。。。
    lvsshuttao
        8
    lvsshuttao  
       2020-07-03 12:13:25 +08:00
    @tzhhahaha 是的,感觉这个目录应该没这么重要的,是不是还执行了其它命令?你先查看 ~/.bash_hsitory, ~/.zsh_history 之类文件,看下你执行过哪些命令先
    ygchy
        9
    ygchy  
       2020-07-03 12:13:40 +08:00 via iPhone
    试试看 Command+R 恢复模式,然后恢复时间机器备份,看看有没有本地快照啥的可用?
    ygchy
        10
    ygchy  
       2020-07-03 12:15:19 +08:00 via iPhone
    然后,还有恢复模式下磁盘工具对系统盘运行一下“急救”也可以试试,也许会检查并修复磁盘权限,或者找找看修复磁盘权限的其他办法。
    lvsshuttao
        11
    lvsshuttao  
       2020-07-03 12:20:54 +08:00
    @tzhhahaha 网上看了下,你不是第一个人
    https://apple.stackexchange.com/questions/244759/osx-recovering-ownership-after-bad-chown-command
    https://discussions.apple.com/thread/4960066

    你可以自己搜索下 macos Repair disk permissions with Disk Utility
    tzhhahaha
        12
    tzhhahaha  
    OP
       2020-07-03 12:56:28 +08:00
    多谢各位大佬帮助。
    目前看来就是
    sudo chown -R 777 /var/*
    导致的, 然后现在 /var 目录是这样子, 问题是我要咋给他改回去呢。。。
    另外 /var 好像 mac 解释是
    According to Apple developer information, the var folder is a reference to “per-user temporary files and caches.” What this means is, this is a temporary or cache file that is not in the Home folder. This way, cache data - which Apple is keen to store - is not transferring data over a network

    tangmoumou@Lily /var$ ll ‹system›
    total 0
    drwx------ 2 777 wheel 64B 8 24 2019 agentx
    drwxr-xr-x 8 777 wheel 256B 10 24 2019 at
    drwx------ 287 777 wheel 9.0K 7 3 11:57 audit
    drwx------ 2 777 wheel 64B 10 18 2019 backups
    drwxr-xr-x 105 root wheel 3.3K 7 3 11:06 db
    drwxr-xr-x 2 root sys 64B 10 18 2019 empty
    drwxr-xr-x 4 root wheel 128B 6 12 2018 folders
    drwx------ 2 root wheel 64B 6 15 14:32 install
    drwxr-x--- 2 777 _jabber 64B 8 24 2019 jabberd
    drwxr-xr-x 3 777 wheel 96B 9 19 2019 lib
    drwxr-xr-x 51 777 wheel 1.6K 7 3 11:58 log
    drwxr-x--- 2 777 _mobileasset 64B 10 18 2019 ma
    drwxrwxr-x 2 777 mail 64B 10 18 2019 mail
    drwxr-xr-x 3 777 wheel 96B 10 18 2019 msgs
    drwxr-xr-x 2 777 wheel 64B 10 18 2019 netboot
    drwxr-xr-x 6 777 _networkd 192B 5 15 10:36 networkd
    drwxr-x--- 9 777 wheel 288B 4 16 2019 root
    drwxr-xr-x 4 777 wheel 128B 10 18 2019 rpc
    drwxrwxr-x 28 777 daemon 896B 7 3 12:02 run
    drwxr-xr-x 2 777 wheel 64B 10 18 2019 rwho
    drwxr-xr-x 4 777 wheel 128B 5 15 10:36 select
    drwxr-xr-x 6 777 wheel 192B 10 24 2019 spool
    drwxr-xr-x 5 777 wheel 160B 2 1 22:52 sunlogin
    drwxrwxrwt 6 777 wheel 192B 7 3 12:03 tmp
    drwxr-xr-x 4 root wheel 128B 7 3 10:20 vm
    drwxr-xr-x 4 777 wheel 128B 5 15 10:35 yp
    nicevar
        13
    nicevar  
       2020-07-03 13:46:05 +08:00
    别慌, 按 Command + R 进入恢复模式, 用磁盘工具修复一下看看
    minamike
        14
    minamike  
       2020-07-03 13:49:55 +08:00 via iPhone
    恢复模式系统覆盖安装一遍试试
    tzhhahaha
        15
    tzhhahaha  
    OP
       2020-07-03 14:33:25 +08:00
    @minamike
    @nicevar
    我先磁盘工具修复试试, 其他方式没辙了,sudo 已经用不了了
    覆盖重新安装我之前软件是不是都没了。。。
    nicevar
        16
    nicevar  
       2020-07-03 15:36:50 +08:00
    @tzhhahaha MacOS 覆盖安装文档还在的, 只要你不手动去抹盘, 但是你最好先修复, 这种误操作磁盘修复能搞定的
    tzhhahaha
        17
    tzhhahaha  
    OP
       2020-07-03 15:37:41 +08:00
    @nicevar
    磁盘修复之后还是不行,重装了。。。
    minamike
        18
    minamike  
       2020-07-03 16:03:36 +08:00 via iPhone
    @tzhhahaha 覆盖安装只是修复系统错误 只要不抹盘 你的文件是啥样还是啥样
    tzhhahaha
        19
    tzhhahaha  
    OP
       2020-07-03 16:14:52 +08:00
    @minamike 赞, 覆盖安装完了该是啥样是啥样,挺棒的
    IgniteWhite
        20
    IgniteWhite  
       2020-07-03 16:39:01 +08:00 via iPhone
    恢复模式进终端或者直接小字命令行模式 chmod 改回去试试?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5873 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 02:15 · PVG 10:15 · LAX 19:15 · JFK 22:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.