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

For cPanel & WHM version 64

Overview

The /scripts/check_cpanel_rpms script checks all of the installed RPMs on your server for issues. This script also offers you the opportunity to reinstall the affected RPMs in order to repair the issue.

Note:

To run the /scripts/check_cpanel_rpms script during nightly maintenance, use the Maintenance cPanel RPM Check and Maintenance cPanel RPM Digest Check settings in the Software section of WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings). 

Script functions

The /scripts/check_cpanel_rpms script performs four basic functions each time that it runs:

  1. Discovers missing RPMs.
  2. Tracks RPMs that are out-of-date and need updates.
  3. Checks whether there are any RPMs that are unexpectedly altered. The script considers files to be altered if any of the following conditions are true:
    • Their ownership has changed.
    • Their mode has changed.
    • An MD5 sum does not exist.
    • They are symlinks, and the file points to the wrong path.
    • They are missing.
  4. Checks whether any installed cPanel-managed RPMs should be uninstalled.

Warning:

The /scripts/check_cpanel_rpms script does not check for or correct file permissions issues.

Note:

If the /scripts/check_cpanel_rpms script does not detect any problems, it will not produce any output. 

 

Run the /scripts/check_cpanel_rpms script

To run the /scripts/check_cpanel_rpms script on the command line, use the following format:

/scripts/check_cpanel_rpms [options]

 

Options

You can use the following options with the /scripts/check_cpanel_rpms script:

OptionsDescription
--fixShows any problems and automatically corrects them.
--list-onlyLists altered RPMs, and then exits.
--long-listShows the altered RPMs and files in an easily-parsed format.
--notifySends a notification that lists any altered RPMs and describes any actions that the system performed.
--targetsFilters RPMs based on provided targets (comma delimited).
--nodirThe script will not read the /var/cpanel/rpm.versions.d directory.
--no-digest

The script will not check for altered files. Instead, it only performs file size validation. This means that if the file is altered, but the file size is identical, the system will not detect the change.

Note:

This option applies the --nodigest and --nomd5 options to the rpm -Vv check.

 

For example, to use the --fix option, run the following command:

/scripts/check_cpanel_rpms --fix 

 

Checks performed

The /scripts/check_cpanel_rpms script runs the rpm -Vv check on all cPanel-managed RPMs. This check determines whether the files have changed since their installation. The system ignores configuration and documentation files during this process.

Note:

If the output indicates that only Mode or mTime have changed, the system will not consider that file altered. 

The output of the rpm -Vv check lists the following changes:

CheckDescription
SFile size differs.
MMode differs (This includes permissions and file type).
5MD5 sum differs.
DDevice major or minor number mismatch.
LreadLink(2) path mismatch.
UUser ownership differs.
GGroup ownership differs.
TmTime differs.
PCapabilities differ.

Additional documentation