Step 1. Log in to the cPanel.
Step 2. Look for Directory Privacy option in Files section and click on it.
Step 3. Choose any Directory from this List which you want to protect.
Step 4. Check on Password protect this directory also enter the name of slected file and click on Save button and Go back to previous page.
Step 5. Now create User and Password for directory and save it. You need to save that password for future use.