Files
# Make the file immutable
sudo chattr +i /home/user/important_file.txt
# Verify the immutability
lsattr /home/user/important_file.txt
# Output might look like: ----i----------- /home/user/important_file.txt
# Attempting to delete or modify will now fail
rm /home/user/important_file.txt
# Output: rm: cannot remove 'important_file.txt': Operation not permitted