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-
- Go to your cPanel account and log in.
- Go to the Files section and select “Directory Privacy” from the menu.
- Select the directory you wish to secure by clicking on it.
- You’ll be taken to a page called “Set permissions for “/home/idigitalcamp/public HTML”
- As shown in the screenshot, select the option Password guard this directory.
- 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.
- Finally, press the “Save button”.
- After that, a confirmation page will appear. Select Go Back from the menu.
- 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.
- Then click the Save button.
- Lastly, click on Go Back.
- 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, example.com) 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.