Mastering chattr: A Comprehensive chattr Linux Tutorial
The chattr command is used to protect your files on a Linux system. This command lets you complete attributes for files so as to protect them further. In this Linux chattr tutorial, we will explain how to use this powerful utility.
The first thing you can do is to check what flags can be set with chattr. The +i flag, for example, makes a file immutable (read also the help of chattr(1)). My suggestion would be to run chattr +i filename in a terminal.