Child pages
  • How to Create Custom Jailed Shell Mounts
Skip to end of metadata
Go to start of metadata

Overview

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:

    /usr/local/test1
    /usr/local/test2
    /usr/local/test3


    Warning:

    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.

     

    Note:

    Custom mounts are read-only for jailshell users. 


  3. Save the file.

 

Unmount a custom mount

Important:

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 

Note:

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