chattr - change file attributes on a Linux file system.
Change file attribute to read-only
chattr +i file.txt
Change attributes to read-only recursively:
chattr -R +i /home/james/
Remove read-only attributes:
chattr -i file.txt
Change attributes to append-only:
chattr +a file.txt