1. Access your cPanel on any browser, input yourdomainname.com/cPanel and fill the username and password then click login.
2. Under the Files section, click on the Directory Privacy.
3. Click on the name of the directory that you wish to password protect.
4. You will be redirected to a page where you need to select the checkbox for Password protect this directory.
5. Enter a name for the selected directory. It is important to note that this serves as the label of that directory. It does not change the directory's actual name.
6. Click on the Save button.
7. A confirmation page will appear. Click Go Back.
8. You will then need to create a User that can have access to this directory.
9. Fill in the Username, New Password, and Confirm Password You can utilize the Password Generator button to generate a strong password.
10. Click the Save button.
11. Click Go Back.
Note: At this time, the cPanel can only protect directories, not individual files. Any file that needs protection can be placed in a protected directory. This also does not protect the directories that can be accessed locally or through FTP, SFTP, or Web Disk.