this post was submitted on 22 Jun 2024
37 points (93.0% liked)

Linux

48082 readers
1270 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

(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.
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 4 months ago (1 children)

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.

[–] [email protected] 1 points 4 months 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.