You have the option in cPanel to set up a password to a directory (folder) to protect it or to keep it private and only to allow access to those you give the username and password to. Bellow we will be going over on how to set up a password for a directory with in cPanel.
1.Log into your cPanel
2.Under the Files section click on Directory Privacy icon.
3.Click on EDIT next to the folder you want to set up a username and password for.
4.Click on the box for Password protect this directory then enter a name for the protected directory and click save.
5.Create a user and password.
6.Now you can test if it work by going to that directory in the browser and it should give a pop asking you to sign in.