How to Add Directories to a VirtFS Jailed Shell in WHM

How to Add Directories to a VirtFS Jailed Shell in WHM


This document provides instructions about how to grant jailed shell users access to additional files outside of the user’s home directory.


cPanel, Inc. does not support this workaround. Also, we do not guarantee that it will work in the future, and it may cause security and stability issues.

Add a file or directory to the jailed shell

To add a file or directory, perform the following steps:

  1. Connect to your server via SSH as the root user.
  2. Use your preferred text editor to add the file or directory’s full path to the /var/cpanel/exim.conf.deps file.
  3. Save and close the /var/cpanel/exim.conf.deps file. Users who log in to the jailed shell can now access to the file or directory that you specified in Step 2.
  4. Use your preferred text editor to add the following path to the /etc/cpanelsync.exclude file:
  5. Save and close the /etc/cpanelsync.exclude file.


    This step makes certain that future cPanel & WHM updates do not overwrite the /var/cpanel/exim.conf.deps file. If you do not perform this step, the system may overwrite your changes.

To revoke jailed shell users’ access to a file or directory, remove it from the /var/cpanel/exim.conf.deps file.


For example, to allow jailed shell users to access the /etc/hosts file, add the following filepath to the /var/cpanel/exim.conf.deps file:


Then, add the following path to the /etc/cpanelsync.exclude file:


Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.