How to Create Custom Jailed Shell Mounts, Disable Disk Space Warnings, Disable Services, and Downgrade Local Licenses in cPanel & WHM

How to Downgrade Local License for Testing Last modified: 2024 February 19 Overview This document provides steps to downgrade your server’s local license for testing purposes. You can use the file /var/cpanel/license.cfg to request a restricted cPanel & WHM license. This restricted license will benefit developers who would like to test custom code or experiment with user limitations. The system uses the /var/cpanel/license.cfg file to determine the license request to downgrade your local license. Note: You cannot use this file to upgrade your license. To upgrade your license, contact cPanel Customer Service. Downgrade your local license To downgrade your local license for testing, perform the following steps: From the command line, log in to your cPanel & WHM server as the root user. Open the /var/cpanel/license.cfg file with your favorite editor. Edit the producttype and maxusers values to your desired settings. See the table below for more information. Save the file and refresh the license. To refresh the license, run the /usr/local/cpanel/cpkeyclt script. Available values Variable Type Description Possible values Example producttype string A server profile. databasenode — The Database profile. dnsnode — The DNS profile. dnsonly — The DNSOnly® mode. mailnode — The Mail profile. cloudlinux — The CloudLinux Node profile dnsnode maxusers integer A numeric value. A positive integer that does not exceed the maximum user count for your license. 40

cPanel jailed shell mountsdisable disk space warningsdisable cPanel servicesdowngrade cPanel license

~3 دقیقه مطالعه • بروزرسانی ۲۹ بهمن ۱۴۰۴

1. Create Custom Jailed Shell Mounts


You can create custom jailed shell mounts to allow jailed users read-only access to additional directories or files on the server.


Important: All custom mounts are read-only for jailshell users.


1.1 Add Directories to a Custom Mount


  1. Create the file:
    /var/cpanel/jailshell-additional-mounts
  2. Add each directory path on a separate line:
    /usr/local/test1
    /usr/local/test2
    /usr/local/test3
  3. Save the file.

Warnings:

  • Use absolute paths only.
  • Do not use trailing slashes.
  • Do not place multiple entries on the same line.

1.2 Add Files to a Custom Mount


  1. Create the file:
    /var/cpanel/jailshell-additional-files
  2. Add each file path on a separate line:
    /usr/local/test1.txt
    /usr/local/test2.txt
    /usr/local/test3.txt
  3. Save the file.

1.3 Path Requirements


Correct format:

/usr/local/test1

Incorrect formats:

  • test1 — relative path
  • test1/ — relative + trailing slash
  • /usr/local/test1/ — trailing slash
  • Multiple paths on one line

Warning: Incorrect formatting may cause server failures.


1.4 Unmount a Custom Mount


You cannot remove entries from the mount file to unmount them. Use the umount command:


umount /home/virtfs/username/usr/local/example

The system does not automatically unmount custom mounts when the user logs out.



2. How to Disable Disk Space Warnings


You can disable disk space warnings using two different files depending on your needs.


2.1 Disable Disk Monitoring for Specific Mount Points


Edit the file:

/var/cpanel/chkservd_ignored_mounts

Add one mount point per line:

snap
tempbackup

Rules:

  • Only alphanumeric characters and slashes are allowed.
  • Each entry must be on its own line.
  • You can only ignore entire mount points (e.g., /var), not subdirectories (e.g., /var/tmp).

2.2 Disable All Disk Space Warnings


Create an empty file:

/var/cpanel/disablediskfreecheck

Warning: This allows cPanel to operate even when the server is out of disk space, which may cause system failures.



3. How to Disable Services


cPanel’s nightly maintenance script automatically restarts services. If this causes issues, you can disable specific services.


Disabled services are stored in:

/var/cpanel/disabled

3.1 Disable a Service


Add one of the following touch files:


FileDescription
secureitDisables the secureit script
securetmpDisables /tmp security
terminal-colorsDisables color output in WHM Terminal
cloudlinuxPrevents CloudLinux installation
auto-restart-servicesDisables automatic service restarts


4. How to Downgrade a Local License for Testing


You can downgrade your local license for development or testing using:

/var/cpanel/license.cfg

Note: You cannot upgrade a license using this file.


4.1 Steps to Downgrade


  1. Log in as root.
  2. Edit the file:
    /var/cpanel/license.cfg
  3. Modify the following values:

VariableTypeDescriptionPossible ValuesExample
producttypestringServer profiledatabasenode, dnsnode, dnsonly, mailnode, cloudlinuxdnsnode
maxusersintegerUser limitAny positive integer within license limits40

After editing, refresh the license:

/usr/local/cpanel/cpkeyclt

Conclusion


This guide covers advanced administrative tasks including custom jailed shell mounts, disabling disk space warnings, disabling services, and downgrading local licenses. These tools give system administrators greater flexibility and control over cPanel & WHM environments.


نوشته و پژوهش شده توسط دکتر شاهین صیامی