Use the /etc/cpanelsync.exclude file to prevent updates to cPanel-distributed files. This method causes fewer problems than other methods of update prevention (for example, the use of the immutable state).
Note:
This method only prevents an update from the cpanelsync utility. It does not prevent updates that occur at application runtime.
You cannot use the cpanelsync.exclude file to prevent modifications to configuration files, datastores, or similar types of files.
You cannot block updates to package-managed files within the /etc/cpanelsync.exclude and /etc/cpanelsync.no_chmod files.