How to Create Custom Jailed Shell Mounts in WHM
When you create a custom jailed shell mount, you can allow users of jailed shells to access additional directories on the server.
Create custom mounts
To create custom mounts that allow jailed shell users to access specified directories, perform the following steps:
- Create the
/var/cpanel/jailshell-additional-mountsfile with your preferred editor.
- List each directory as a fully-qualified (or absolute) directory on a separate line. For example:
/usr/local/test1 /usr/local/test2 /usr/local/test3
Do not use relative paths, and do not append a trailing slash to the directory names.
For example, if you wish to specify the
/usr/local/test1directory, do not enter it in the following formats:
test1— This is a relative directory.
test1/— This is a relative directory and contains a trailing slash.
/usr/local/test1/— This contains a trailing slash.
/usr/localtest1 /usr/local/test2 /usr/local/test3— These are not on separate lines.
If you do not format the directories in the
/var/cpanel/jailshell-additional-mountsfile correctly, your server may fail.
Custom mounts are read-only for jailshell users.
- Save the file.
Unmount a custom mount
You cannot remove an entry in the
/var/cpanel/jailshell-additional-mounts file to unmount a custom mount. To unmount the custom mount, use the
To unmount the
/usr/local/foo directory, run the following command:
username with the cPanel user’s username.
The system does not unmount custom mounts when the user logs out of the jailed shell account.