We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Page tree
Skip to end of metadata
Go to start of metadata


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: 

  1. Create the /var/cpanel/jailshell-additional-mounts file with your preferred editor.

  2. List each directory as a fully-qualified (or absolute) directory on a separate line. For example:



    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/test1 directory, 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-mounts file correctly, your server may fail.



    Custom mounts are read-only for jailshell users. 

  3. 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 umount command.

To unmount the /usr/local/foo directory, run the following command:

umount /home/virtfs/username/usr/local/foo 


Replace username with the cPanel user's username. 

The system does not unmount custom mounts when the user logs out of the jailed shell account.

Additional documentation

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels