If you have a file that you want nobody can change it, you shall type the following command into a shell

# sudo chattr +i filename

You can check the attributes using the following command:

# lsattr

----i------------- ./gg1.txt
 

Now also the root user cannot delete the file, if the root user want to change/delete this file he shall reset the file attributes as follows:

# sudo chattr -i filename

You can check the attributes using the following command:

# lsattr

------------------ ./gg1.txt

 

Merry xmas