Password Protection with Directory Privacy

What is Directory Privacy?

How can I add a password to a particular folder of my site?

How do I add new usernames and passwords combos?

How do I change a password for an existing user?

How to I remove users?

How do I completely remove password protection form a folder?

 


What is Directory Privacy?

cPanel uses the Directory Privacy tool to allow you to password protect specific folders in your account. Once added, any user trying to access data or pages within that folder will be prompted to enter a username and password before they can gain access. It is important to know that you can only password protect whole directories and not individual pages. If you have a single page you need to password protect, you would need to create a directory for its storage and password protect the whole folder in order to secure access.


If you have any questions about this, please let us know.




How can I add a password to a particular folder of my site?


There are several steps to password protecting a directory within cPanel. Follow the instructions below to do so!


1) Login to your cPanel account.


2) In the Files section, click the Directory Privacy icon

privacy icon


3) On this first page, you will be asked to navigate to and select the directory you wish to password protect. In most cases you will probably want to password protect a folder on your website and these all exist within your public_html folder. Use the Folder icon to open your public_html directory and then select the folder name you wish to password protect by clicking the folder name itself.

4) Once you have carefully selected the directory you with to password protect, you will be presented with a new page. You should confirm the directory path and folder name before you proceed. If you need to correct anything, you’ll need to go back to the pervious step.


To proceed, this page will also ask you to complete and save TWO steps. Please note, successfully creating password protection relies on the completion and saving of both steps.


5) Step one : Security settings


The very first thing you will need to be sure to do is click the check box for Password protect this directory.

password protect this directory

In the text field just below this, you will be asked to specify the name of the directory. Depending on the browser they are using, this value will be displayed in the pop-up box that a user sees when they try to access your protected directory.


Once you have clicked the check box and specified the folder name, you MUST click the blue Save button.

save

Please note, if you skip this first SAVE, your password protection will not function properly.



6) Step two - Create User

The next and final step is to create the username and password combo for access.


You’ll need to specify a unique username and enter the desired password twice. If manually entering a password, you must consider the Password Strength Indicator. You may also generate a strong password by clicking on the Password Generator button.

Once you have entered a username and the password twice, click the blue Save button

save


You should receive a Success message in green. To return to the previous page click Go Back link

go back


That’s it. If your password protection does not work as you expected it, let us know.

 

 



How do I add new usernames and passwords combos?



You may need to add additional username and password combos. Do so using the steps below.


1) Login to your cPanel account.


2) In the Files section click the Directory Privacy icon

privacy icon


3) On this first page, you will need to navigate to and select the directory that you have previously password protected. Password Protected directories are indicated by a lock icon instead of a folder icon. Navigate to your protected folder and move forward to the Directory Privacy page.

4) Once on the Directory Privacy page, you can create one new user at a time. You’ll need to specify a unique username and enter the desired password twice. If manually entering a password, you must consider the Password Strength Indicator. You may also generate a strong password by clicking on the Password Generator button.

Once you have entered a username and the password twice, click the blue Save button
save


You should receive a Success message in green. To return to the previous page click Go Back link.

go back


That’s it!

 




How do I change a password for an existing user?

 

You may need change the password for an existing user. Do so using the steps below.


1) Login to your cPanel account.


2) In the Files section click the Directory Privacy icon

privacy icon


3) On this first page, you will need to navigate to and select the directory that you have previously password protected. Password Protected directories are indicated by a lock icon instead of a folder icon. Navigate to your protected folder and move forward to the Directory Privacy page.


4) To update a password for an existing user, simply ADD the user a second time in the Create User section.

You’ll need to specify the unique username, matching case and then enter the desired new password twice. If manually entering a new password, you must consider the Password Strength Indicator. You may also generate a strong new password by clicking on the Password Generator button.


Once you have entered the existing username and the new password twice, click the blue Save button

save

You should receive a Success message in green. To return to the previous page click Go Back link

go back


That’s it.

 

 



How to I remove users?

 

You may need to remove username and password combos. Do so using the steps below.


1) Login to your cPanel account.


2) In the Files section click the Directory Privacy icon

privacy icon


3) On this first page, you will need to navigate to and select the directory that you have previously password protected. Password Protected directories are indicated by a lock icon instead of a folder icon. Navigate to your protected folder and move forward to the Directory Privacy page.


4)
Once on the Directory Privacy page, look for the Authorized Users section. Click once to highlight the user you wish to remove and then click the blue Delete User button.

delete user


You should receive a Success message in green. To return to the previous page click Go Back link.

go back

That’s it!

 

 




How do I completely remove password protection form a folder?



Should you come to a point where you no longer need to password protect your content, either permanently or temporarily, you can use these steps to remove the password protection.



1) Login to your cPanel account.


2) In the Files section click the Directory Privacy icon

privacy icon

3) On this first page, you will need to navigate to and select the directory that you have previously password protected. Password Protected directories are indicated by a lock icon instead of a folder icon. Navigate to your protected folder and move forward to the Directory Privacy page.

4)
Once on the Directory Privacy page, look for and uncheck the Password Protect This Directory option

password protect this directory


Now, be sure to click the blue Save button

save


You should receive a Success message in green. To return to the previous page click Go Back link.

go back


That’s it!

Please note - shutting off the password protection in this manner will maintain both the Directory Name and Authorized User detail. Should you wish to restore the password protection once more, simply follow the steps above to check the Password Protect this Directory option and Blue Save button once more and all the password protection with previously saved user data will be restored.


If you have any question about this, let us know.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Edit file in the cPanel File Manager?

Editing a file using cPanel's File Manager allows you to make immediate changes to your web site...

How to create a new folder or files in the cPanel File Manager?

Follow the steps below to create directories or files with your cPanel File Manager.To create a...

How to upload files via the cPanel File Manager?

If you don't want to use a 3rd party FTP Software, you can use the cPanel's built in File Manager...

Managing Indexes

With the absence if an index file, the cPanel server will display the content of a directory when...