Hacker News new | ask | show | jobs
by alphacome 3740 days ago
I am wondering why the OS not introduce a policy to protect important files/directories. For example, we can mark something is important, then if someone try to delete it, it will ask the person to input some key (at least 20 characters), if the key is incorrect, the operation will be canceled.
2 comments

Yes, we call those marks "permissions". Most operating systems have them. The problem is putting the right process in place around using them.
There are also (extended) attributes, such as the "immutable" flag, available on some OSs/filesystems.

If you're interested, look into chattr for Linux, and chflags for BSDs.

https://en.wikipedia.org/wiki/Chattr

That would get annoying very quickly, and also in an ideal world you use a config management tool like Chef and manage your server through there.