Files on extended type file systems, which are common in Linux (for example, ext2, ext3, ext4, and so on) can be made immutable. Certain type of file attributes help to set the immutable attribute to the file. When a file is made immutable, any user or super user cannot remove the file until the immutable attribute is removed from the file. We can easily find out the file system type of any mounted partition by looking at the
/etc/mtab file. The first column of the file specifies the partition device path (for example,
/dev/sda5) and the third column specifies the file system type (for example, ext3). Let's see how to make files immutable.
chattr can be used for to make files immutable. However, it is not the ...