How to Create Custom Jailed Shell Mounts
Last modified: June 19, 2019
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:
/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:
1 2 3
/usr/local/test1 /usr/local/test2 /usr/local/test3Warning:
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/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.Note:Custom mounts are read-only for jailshell users.
Save the file.
Unmount a custom mount
/var/cpanel/jailshell-additional-mountsfile to unmount a custom mount. To unmount the custom mount, use the
To unmount the
/usr/local/foo directory, run the following command:
usernamewith the cPanel user’s username.
The system does not unmount custom mounts when the user logs out of the jailed shell account.