Home  >  Q&A  >  body text

ubuntu 修改文件所有者

本想修改当前目录下的文件所有者为user,结果不太熟悉linux命令的我悲剧了。。

sudo chown user:user -R /**

请问现在有什么办法改回去?

sudo chown root:root -R /**

提示:sudo: /usr/bin/sudo 必须属于用户 ID 0(的用户)并且设置 setuid 位

听说有人这么做过sudo rm -R / 没想到我也做了差不多的事情。。

还有救吗?

PHPzPHPz2734 days ago1011

reply all(4)I'll reply

  • 阿神

    阿神2017-04-24 09:12:50

    It seems there is no way to recover...

    For simple processing, set root:root for the / folder, and user:user for the personal directory.

    reply
    0
  • PHPz

    PHPz2017-04-24 09:12:50

    Log in with your account directlysu或者用root and change the owner back

    reply
    0
  • 黄舟

    黄舟2017-04-24 09:12:50

    Reinstall the system.

    reply
    0
  • 高洛峰

    高洛峰2017-04-24 09:12:50

    It’s hopeless, reinstall it

    reply
    0
  • Cancelreply