From within cPanel you can password protect a folder. This allows you to require a username and password to access a folder or folders from the web. First log in to your cPanel:
Once logged in, towards the bottom of the page click on Password Protect Directories
A window will popup asking you which directory to open. Select Web Root and the clickGo.
The Password Protect Directories page will now open. You will see a listing of the folders inside your public_html folder. You can select a folder you wish to protect by clicking on the folder name, or you can open a folder to select a folder within by clicking on its icon. For this example we will protect the images folder by clicking on its name.
We now need to complete some settings and add a user that has access to the protected folder. In the Security Settings section tick on the box next to Password protect this directory: and enter a Name for the protected directory. For this example we will give it the name Protected Images. Click Save.
A page will be shown as below notifying you the access permissions for the directory have been set. Click Go Back.
We should now add a user that will be given access to the protected folder. Enter aUsername, then enter a New Password and New Password (again). When ready clickAdd/modify authorized user.
At the bottom of the page you will now notice a user has been added to the Authorized Users section. If you wish you can create another user or delete a user.
You should also notice that within the folder listing of the Password Protect Directories page there is a padlock beside the folder name indicating that it's a password protected folder.