Filesystem security is an important part of keeping the data in our databases safe. This is because MariaDB, like most programs, stores the data it handles in files on our filesystem. If those files can be read and copied by anyone who can log in to the server, then there's nothing stopping them from making a copy of those files and then accessing them with MariaDB on another server. This recipe is about securing our files on Linux.
Prior to starting this recipe, use the package manager to install the tree
program.
On Fedora, Red Hat, or CentOS, run the following command:
sudo yum install tree
On Debian or Ubuntu, run the following command:
sudo apt-get install tree