View all comments ➔Show context ➔
  • 11 months

    I don’t think that actually works; the attacker could just remove .bashrc and create a new file with the same name.

    • If the .bashrc is immutable, the attacker can’t remove it.
      That’s how it works.

        • ?

          It’s .bashrc, not bashrc, and .bashrc is in the home directory.
          If .bashrc is immutable, it can’t be removed from home.

          • 11 months

            It’s the directory that needs to be writable to delete files, not the file itself.

            Although the immutable bit (if that’s what you’re talking about - I thought you meant unsetting the write bit) might change that, I’m not sure.

    • you’re right. that’s something i wanted to look into. guess setfacl would do the trick?