Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Move cagefs-skeleton directory from /usr/share to another partition

What is CageFS?

cagefs is a virtualized file system and a set of tools to lock each cpanel/ system user in its own space called ‘cage’. Each user will have its own fully functional CageFS, with all the system files, tools, etc…  For a in cagefs only safe binaries or custom binaries enabled by root should available. CageFS user will be restricted to see other users.

CageFS create an individual namespace for each user, this technique make it possible to hide other user and their files. CageFS create  high level of isolation. The safe files for cageFS users are created under default location /usr/share/cagefs-skeleton.

Sometimes you might need to move cagefs-skeleton from /usr/share to another partition like /home due to low free disk space available in the /usr partition. Please find below steps to migrate cagefs_skelton from default location i.e. /usr/share/cagefs_skelton.

How to move cagefs_skelton from default location?

  •  If /usr/share/cagefs-skeleton already exists:

$ cagefsctl –disable-cagefs 
$ cagefsctl –unmount-all
# To ensure that the following command prints empty output: 
$ cat /proc/mounts | grep cagefs 
# if you see any cagefs entries, execute “cagefsctl –unmount-all” again.
$ mv /usr/share/cagefs-skeleton /home/cagefs-skeleton 
$ ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton
cagefsctl –enable-cagefs

  •  If /usr/share/cagefs-skeleton is not created yet (cagefsctl –init wasn’t executed), then execute:

$ mkdir /home/cagefs-skeleton 
$ ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton 
$ cagefsctl –init

On cPanel servers, if you place skeleton into /home directory, then you should configure the following option:

In cPanel WHM choose Server Configuration and go to Basic cPanel/WHM Setup, then in Basic Config change Additional home directories default value to blank (not “home”).

Note: If this option is not set, then cPanel will create new accounts in incorrect places.

 

Ref: https://docs.cloudlinux.com/index.html?moving_cagefs-skeleton_directory.html

Comments are closed.