fsprotect is a set of scripts that protect existing filesystems. fsprotect is excellent for public computers like those in libraries, internet cafés, etc.
Using aufs they pack a tmpfs filesystem forcing changes to be written to the tmpfs filesystem.
The root filesystem is protected by an initramfs script. Other filesystems are protected by an init script. All protected filesystems become read-only ensuring their immutability even on power-offs.
To install fsprotect in all currently supported versions of Ubuntu open the terminal and type:
sudo apt-get install fsprotect
The benefits of using fsprotect are:
- Filesystems are protected and no change is ever written to the disk.
- Protected filesystems are mounted read-only. This means that they aren't damaged when the computer is turned off improperly.
- It is very easy to use.
- In some cases it makes the filesystem access faster.
The drawbacks of using fsprotect are:
- Filesystem changes cannot be more than a predefined limit in bytes (set by you).
- Since tmpfs is heavily used, you need to have adequate swap space.