Child pages
  • The cpanelsync.exclude File

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
LIB:_Version
LIB:_Version

Toc no bullet

Overview

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
titleNotes:
  • 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 RPM-managed files within the /etc/cpanelsync.exclude and /etc/cpanelsync.no_chmod files. 
    • For more information about custom cPanel RPMs, read our How to Build and Install Custom RPMs documentation.
    • To determine whether an RPM manages a particular file, run the following command: 

      Code Block
      languagebash
      rpm -qf /path/to/file


Entries

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:

Code Block
languagetext
linenumberstrue
/usr/local/cpanel/scripts/pkgacct
/usr/local/cpanel/Cpanel/Logd.pm

Use the following commands to add the files' path to the /etc/cpanelsync.exclude file:

Code Block
languagetext
linenumberstrue
echo "/usr/local/cpanel/scripts/pkgacct" >> /etc/cpanelsync.exclude
echo "/usr/local/cpanel/Cpanel/Logd.pm" >> /etc/cpanelsync.exclude

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("updates") and label in ("whm","cpanel") and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("updates") and label = "cpanel" and space = currentSpace()


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("updates") and label = "whm" and space in (currentSpace(),"CKB")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "updates" and space = "DD"