• @Ruscal
    link
    576 months ago

    sudo chmod 000 -R / is very fun way of braking your system and is not widely known 🙂

    • @[email protected]OP
      link
      fedilink
      26 months ago

      What does this do? nobody can read any file? would sudo chmod 777 fix it at least to a usable system?

      • @Ruscal
        link
        116 months ago

        The trick is that you loose access to every file on the system. chmod is also a file. And ls. And sudo. You see where it’s going. System will kinda work after this command, but rebooting (which by a coincidence is a common action for “fixing” things) will reveal that system is dead.

      • @[email protected]
        link
        fedilink
        106 months ago

        Yep. You could run chmod again to fix it (from a different OS / rescue USB), but that would leave all the permissions in a messy state - having everything set to 777 is incredibly insecure, and will also likely break many apps/scripts that expect more restrictive permissions. So the only way to fix this properly would be to reinstall your OS/restore from backups.