sudo’s Hall of pain

  • 𝘋𝘪𝘳𝘬@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    8 months ago

    Some time ago I wanted to clean up home directory files permissions to be not readable by group or others. Instead of just removing group/other permissions I hard-set all directories to 700 and all files to 600.

    Took quite some time to repair not working scripts and “application containers”.

    • wellDuuh@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Well I nuked myself with chmod -r on my home directory this morning… My day is now dedicated to reinstalling nixos on my laptop… Glad I didn’t do this on a production server…

      Will be extra cautious now with the -r commands

      PS: I now see the need of timeshift despite of using nixos… I could have backed up my home dir… And restore the prev state

      • 𝘋𝘪𝘳𝘬@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        Imagine accidentally running it on / instead …

        But wasn’t NixOS not specifically design to be protected against such issues?

        • wellDuuh@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          8 months ago

          😂 heck no! (Just found out)

          Nix provides a platform where you define how the system should be by specifying what version of apps to install, and configurations to inherit.

          It does not back up any configuration and files that are outside the defined configuration file! And Turns out there are plenty of them.

          What, You changed into dark theme on your android studio? Stored on home dir .local, not on nix configuration file

          Every app that I customized it whilst inside the app, the changes are thrown on .local.

          Again… TIMESHIFT would have saved me sooo much time.

          This is me Sangry now

          Edit: I hope this post saves someone a world of pain in the future