How Do You Password-Protect a Directory

October 10, 2022 / cPanel & WHM

We will show you how to protect a directory with a password in this article.

cPanel allows you to password guard directories. All of the files in the password-protected folders are now safe.

Note- cPanel can only protect folders; individual files cannot be protected. A protected directory can hold any file that needs to be protected. Furthermore, it does not secure directories accessed locally or via FTP, SFTP, or Web Disk.

Steps for Using a Password to Protect a Directory-

  1. Go to your cPanel account and log in.
  2. Go to the Files section and select “Directory Privacy” from the menu.
  3. Select the directory you wish to secure by clicking on it.
  4. You’ll be taken to a page called “Set permissions for “/home/idigitalcamp/public HTML”
  5. As shown in the screenshot, select the option Password guard this directory.
  6. In the Enter, a name for the protected directory field of Security Settings, type the name of the selected directory. It’s worth noting that this is the directory’s label. It has no effect on the directory’s real name.
  7. Finally, press the “Save button”.
  8. After that, a confirmation page will appear. Select Go Back from the menu.
  9. Then you must create a user who has permission to access this directory. Fill in the Username, New Password, and Confirm Password sections under Create User. The Password Generator button will help you to generate a strong password.
  10. Then click the Save button.
  11. Lastly, click on Go Back.
  12. To see if your directory is password-protected, open it in your browser and browse it. Your folder has been password-secured if the browser prompts you to log in. The public html (the domain name, has been visited via a browser in this example. A pop-up box will appear when someone accesses it, as shown below-

NOTE- To access the directory, use the username and password you created in the previous step.

We hope that you now have a good understanding of How Do You Password-Protect a Directory. If you continue to have problems with the protocol outlined above, please contact the EukHost Team for constructive assistance 24 hours a day, 7 days a week.

Spread the love