The cpanelsync.exclude File
Last modified: December 14, 2021
/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
- This method only prevents an update from the
cpanelsyncutility. It does not prevent updates that occur at application runtime.
- You cannot use the
cpanelsync.excludefile to prevent modifications to configuration files, datastores, or similar types of files.
- You cannot block updates to package-managed files within the
- For more information about custom cPanel packages, read our How to Build and Install Custom RPMs on Red Hat Systems documentation.
- To determine whether a package manages a particular file, run the following command:
- On Ubuntu® servers:
- On Red-Hat servers:
rpm -qf /path/to/file
dpkg -S /path/to/file
Each entry in the
/etc/cpanelsync.exclude file must use an absolute path, with each path on its own line.
For example, you may wish to prevent an update to the following files:
Use the following commands to add the files’ path to the