# chattr +i test_file
to unset itchattr -i test_file
To make the file append only
use
chattr +a tst_file
to unset it use
chattr -a test_file