Skip to content

Private Directories ​

Private Directories

URL: /client/private-directories-page - in the sidebar under Files.

Set a password to protect certain directories of your account. When you enable this feature, a user accessing the directory will be prompted to enter credentials.

Getting Started ​

Click a folder icon or name to navigate the file system. To select a folder, click Edit.

Select Domain ​

Select a domain to manage directory privacy settings.

Directory List ​

A table displays all directories with columns: Domain (sortable), Protected, Actions.

  • Domain - The directory path
  • Protected - Whether the directory has password protection enabled
  • Edit - Configure protection settings for the directory (see below)
  • Browse - View the directory contents

Edit Directory Protection ​

When you click Edit for a directory, a form appears with the following option:

  • Password protect this directory (checkbox) - Enable or disable password protection for the selected directory

Form buttons: Save, Cancel

Which folders can be protected ​

Since panel 1.9.3, Private Directories protects folders inside your own home directory only:

  • The domain's website folder may itself be a symbolic link, as long as it leads to another folder inside your home directory, for example a public_html that points to app/current/public. Protecting and unprotecting work there as before.
  • A folder you protect must lie inside the domain's website folder. A sub-folder reached through a link is accepted only when the link stays inside that website folder.
  • A website folder or sub-folder that leads outside your home directory, for example through a link to another account or a system folder, is refused before anything is stored or written. Replace the link with a real folder inside your home directory, then try again.

Folder names on OpenLiteSpeed ​

When the server runs OpenLiteSpeed, a folder whose name contains a space or a brace ({ or }) cannot be protected. The panel refuses it before anything changes:

Directory names with spaces or braces cannot be protected on this web server.

Rename the folder without spaces or braces, then protect it again. Removing the protection of such a folder still works.

Pagination ​

Select how many directories to display per page: 5, 10, 25, 50, or All.

Use the search bar to filter directories by name.

Over the API ​

Since panel 1.9.4, the client REST API manages the protection of a domain's directories under /api/client/domains/{domain_id}/private-directories:

Method and pathWhat it does
GETList the domain's password-protected directories.
PUTProtect a directory, or change its label, user name, or password, like Password protect this directory. path is / for the document root or a directory below it, which must exist. Fields left out, and a blank user name or password, keep their stored value.
DELETERemove the protection of a directory. It also works when the directory no longer exists, and can be repeated when an earlier removal was not applied.

The password is write only: it is never returned. The same folder rules apply as in Which folders can be protected. The endpoints need this page's feature in your hosting plan; see API Keys.