Search Knowledge Base by Keyword

How to set Directory Privacy in cPanel

Directory Privacy allows you to protect a specific directory with a password, to prevent unauthorized users from accessing the directory through a web browser.

Once you enable this feature for a directory, whenever the user attempts to view that directory, the system asks for a login. This feature does not protect directories that users access via FTP, SFTP, Web Desk, or other access when they access files locally

Let’s see how we can set up this setting on cPanel.

First, log in to the cPanel control panel.

Now navigate to Directory Privacy in the Files section.

Directory Privacy section in cPanel

You’ll now see a list of the directories in your hosting account.

Direcotry Privacy options in cPanel

To select a directory to set directory privacy on, just click the name of the directory.

setting Directory Privacy in cPanel

Now you need to fill in the name for the protected directory, as well as the login details for the new user that should have access to the private directory when they access it through their web browser.

Once you’re done, click Save to finish saving your changes.

creating permitted user for private directory in cPanel

When you attempt to access this directory from a web browser, you’ll now be prompted the enter the username and password for the user that you created, before being able to access the directory.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.