cPanel & WHM no longer develops or updates EasyApache 3. We deprecated EasyApache 3 on December 31, 2018. We removed support for EasyApache 3 in cPanel & WHM version 78.
Apache Module: FileProtect - EasyApache - cPanel Documentation
Page tree
Skip to end of metadata
Go to start of metadata


EasyApache's FileProtect option improves the security of each user's public_html directory. This option protects each user account's public_html and each addon domain's document root directory so that only Apache and the user may view its contents.

When you enable this option, EasyApache performs the following actions:

  • Creates the /var/cpanel/fileprotect file.
  • Executes the /usr/local/cpanel/scripts/enablefileprotect script, which sets more secure permissions for each user's /public_html directory.

Featured documentation

  EasyApache 3


Change Log Release Notes  



Migrate from Tomcat 5.5 to 7

How to Deploy Java Applications


EasyApache 3 does not support new installations of Tomcat.

As of cPanel & WHM version 76, EasyApache 4 now supports Tomcat 8.5. For more information, read our Tomcat documentation.

Enable or disable the FileProtect option

Option status in default profiles

The following EasyApache profiles enable the FileProtect option by default:

  • Basic
  • Mod Ruid2


    The Mod Ruid2 profile only exists if you do not use CloudLinux™.


Installation steps

To enable or disable the FileProtect option, perform the following steps:

  1. Run EasyApache in WHM's EasyApache 3 interface (Home >> Software >> EasyApache 3).


    To access EasyApache from the command line interface, run the /usr/local/cpanel/scripts/easyapache script as the root user.

  2. Select the profile that you wish to modify.

  3. Click the  icon that corresponds to your selection.

  4. Click Next Step in the Apache Version stage.
  5. Click Next Step in the PHP Version stage.
  6. Click Exhaustive Options List in the Short Options List stage.
  7. Perform one of the following actions in the Exhaustive Options List stage:
    • To enable the FileProtect option, select the FileProtect option.
    • To disable the FileProtect option, deselect the FileProtect option.


      If you disable the FileProtect option, EasyApache will run the /usr/local/cpanel/scripts/disablefileprotect script and delete the /var/cpanel/fileprotect file.

  8. Click Save and Build.

How to enable or disable the module in a custom EasyApache profile file

The following table contains the module information that EasyApache stores in the profile file for the module:

EasyApache option nameFileProtect
EasyApache Profile EntryApache: optmods: Fileprotect

To enable or disable the FileProtect option in a custom EasyApache profile file, set the Apache: optmods: Fileprotect profile entry to one of the following values:

  • 1 — This value enables the module.
  • 0 — This value disables the module.


This module does not possess any requirements.


This module does not possess any known compatibility issues.


DateEasyApache versionActionDetails
2/11/20143.24.11Doc updateRemoved Apache 1.3 and 2.0
1/3/20133.18.0Doc updateUpdate for Apache 2.4

Related documentation

For more information about EasyApache, view our EasyApache documentation.

For more information about the /usr/local/cpanel/scripts/enablefileprotect script, run the /usr/local/cpanel/scripts/enablefileprotect --help command.