How to check cPanel rpm works or not – cPanel script to check rpm

Yes, this is an important requirement for server admins to check if any corrections has occurred in rpms installed with cPanel. In cPanel, there is a script to check if the rpm is working or not, it is corrected or not etc. See the cPanel script pasted below:

/usr/local/cpanel/scripts/check_cpanel_rpms [options]
Or
/scripts/check_cpanel_rpms [options]

Lets see, what this script is actually doing. The above cPanel script will check the following information.

1, If any missing rpms.
2, Out-of-date rpms and need to be updated.
3, Find any rpms that are unexpectedly altered (ownership has changed, Mode differs, MD5 mismatch, missing, any wrong path in symlinks etc are considered as altered).
4, Identify any of the cPanel managed rpms installed and that are uninstalled from the server.

This scripts execute the rpm -Vv check on all cPanel managed rpms and determines if any changes happened since their installation.

Available options

Different options available with this scripts are:

--fix       - Show any problems and automatically correct them.
--list-only - Only list altered RPMs and then exit.
--long-list - Show in a more easily parsed format the altered RPMs and files.
--notify    - Send out a notification regarding any altered RPMs. Additionally, it will describe any action that was taken.
--targets   - Filter RPMs based on provided targets (comma delimited).
--nodir     - This option will prevent the directory /var/cpanel/rpm.versions.d from being read.
--no-digest - This option will speed up “/scripts/check_cpanel_rpms” run by applying rpm options “--nodigest” and “--nomd5” when rpm -Vv check is performed.

You can run the above script with –fix option to fix if any changes are happened on the already installed rpms.

/usr/local/cpanel/scripts/check_cpanel_rpms –fix

Note: If the output indicates that only Mode or mTime have changed, then that file will not be labeled as “changed.”

      Check  | Description
        S    | File Size differs.
        M    | Mode differs (includes permissions and file type).
        5    | MD5 sum differs.
        D    | Device major/minor number mismatch.
        L    | readLink(2) path mismatch.
        U    | User ownership differs.
        G    | Group ownership differs.
        T    | mTime differs.

That’s it..!

Related Links:
Important WHM/cPanel Scripts
How to stop Open relay in a cPanel server – /scripts/fixrelayd
10+ ‘rpm’ command usages with examples – Unix/Linux

Arunlal Ashok

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *