Step 1: Login to the cPanel account.
Step 2: Select Directory privacy icon under Files section.
Step 3: Select the directory you would like to navigate to the pop-up menu.
Step 4: Select the folder you want to protect with the password and click save.
Step 5: Here you should enter the Username and password for the user.
Step 6: Finally hit the save icon. Now your directory was successfully protected.