THIS IS A MIRROR OR ARCHIVE. CLICK HERE TO GET TO THE OFFICIAL CATWITHCODE.MOE PAGE! IF YOU ARE ALREADY ON CATWITHCODE.MOE, IGNORE THIS. BLOCKING JAVASCRIPT IS COOL.

Linux File Write Protection that can not be deleted from sudo

Not much to say about it. I wanted to protect some Files and Folders from writing and deleting even from sudo users.

Protect File and Folders (Recursive):

sudo chattr +i -RV /PATH_TO_STUFF/MODS

Free File and Folders (Recursive):

sudo chattr -i -RV /PATH_TO_STUFF/MODS

Protect File:

sudo chattr +i /PATH_TO_STUFF/Test.sh

Free File:

sudo chattr -i /PATH_TO_STUFF/Test.sh