(More) Specifics:

  • Undoing the protection should include filling in a password.
  • The password should be different from the one used with sudo or any other passwords that are used for acquiring elevated privileges.

All (possible) solutions and suggestions are welcome! Thanks in advance!

Edit: Perhaps additional specifications:

  • With 'displace‘, I mean anything involving that resembles the result of mv, cp (move, cut, copy) or whatsoever. The files should remain in their previously assigned locations/places and should not be able to ‘pop up’ anywhere.
  • I require for the files to be unreadable.
  • I don’t care if it’s modifiable or not.
  • I don’t require this for my whole system! Only for a specific set of files.
  • frankfurt_schoolgirl [she/her]@hexbear.net
    link
    fedilink
    English
    arrow-up
    5
    ·
    5 days ago

    What do you mean by a file being displaced? Like do you want it to be unreadable, or unmodified, or just not deleted?

    It’s not really possible to have a level of protection that would require more than sudo because with root access you bypass anything else.

    You could put the files on an encrypted volume that uses a special password when it is mounted. Or you could use the chattr command to set special ext4 attributes that would make it unmodifiable (but could be removed with sudo). Or just record the file’s hash, and that way you know it hasn’t been modified later.

    • poki@discuss.onlineOP
      link
      fedilink
      arrow-up
      1
      ·
      5 days ago

      Like do you want it to be unreadable, or unmodified, or just not deleted?

      I don’t necessariy care for any of those. They are ‘bonuses’ if you will. Though…:

      • Unreadable will be required for preventing recreating the file elsewhere.
      • Unmodifiable is not necessarily required. Maybe I would like to ‘append’ something to an existing file. But I’m fine either way. It should not be possible to delete some of the original data though.
      • Not deleted is a must as well.