How to install CageFS on the CloudLinux

If you have CloudLinux installed on the server, you will able to setup CageFS on your server.
CageFS is a virtualized file system that enables each user to have its own cage.

To install CageFS:

cmd: yum install cagefs -y
cmd: /usr/sbin/cagefsctl -i

That last command will create skeleton directory that might be around 7GB in size. If you don’t have enough disk space in /usr/share, use following commands to have cagefs-skeleton being placed in a different location:

cmd: mkdir /home/cagefs-skeleton
cmd: ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton

On cPanel servers, if you will be placing skeleton into /home directory, you must configure the following option in:

cPanel WHM -> Server Configuration -> Basic cPanel/WHM Setup -> Basic Config -> Additional home directories

Change the value to a blank (not default “home”)

Without changing this option, cPanel will create new accounts in incorrect places.

Once you initialize the template you can start enabling users.
By default, CageFS is disabled for all users.