cPanel serves as an excellent control panel. However, it so happens that a significant drawback of the interface is that configurational settings and changes are overwritten after each upgrade that occurs. As the user, you can make use of the /etc/cpanelsync.exclude file to avoid updates to the cPanel-distributed files. One can rest assured as this method gives rise to lesser issues than other procedures of prevention of updates, for instance, the usage of immutable state. Making settings such that cPanel-distributed files are immutable causes a number of problems.
In order to prevent cPanel from overwriting your configuration files and changes, you can use the following file. The path of the file is given as:
The eligible format for this particular file is one file per line. This can be written as:
Following as written in the instructions and using the commands, it will leave you with the last step. Save the file and make sure to make the changes permanent. Restart cPanel. This makes sure of the fact that cPanel does not overwrite and make changes to the /etc/exim.conf file the following time it undergoes an upgrade.
This method prohibits an update from the cpanelsync utility only. However, it does not check updates that take place during application runtime.
As a user, you cannot utilize the /etc/cpanelsync.exclude file to avoid changes or modifications to the files for configuration, data storage or the same type of files.
You cannot prevent updates to the RPM-managed files placed inside the /etc/cpanelsync.exclude file and /etc/cpanelsync.no_chmod files.
More details regarding customs cPanel RPMs can be found out if you read on the process to build and install custom RPMs. Besides, to find out whether an RPM takes charge of a specific file, run the following command to see the results:
rpm -qf /path/to/file
Every entry in the /etc/cpanelsync.exclude file has to use a fixed and absolute path. Apart from that, each path must be on its own line. Given below are a few examples. You might want to avoid an update to the following files.
Make use of the given commands to add the path of the files to the /etc/cpanelsync.exclude file.
This document, thus, successfully describes what cPanelsync.exclude file is and mentions how to prevent changes to the configuration files or cPanel-distributed files.