Password protecting folders with cPanel
Written by Noah S Saturday, 19 September 2009
Using the Password Protect Directories function in the cPanel will allow you to set user and different passwords on your folders. Here is how you set this up. (PLEASE NOTE: IF YOU ARE USING FRONTPAGE EXTENSTIONS THIS WILL NOT WORK. YOU WILL NEED TO DISABLE FRONTPAGE EXTENSIONS.) Log in to your cpanel: domainname.com/cpanel. Scroll down to Password Protect Directories and click on the icon.
Once you have clicked on the folder icon, you will be given a list of folders in your public_html directory. If you need to protect a folder that is in one of the folders listed, just click on the folder Icon next to the name of the folder. This will allow you to browse the sub-folders of that directory. Once you see the folder you want click on its name. You will then we given a page which allows you to edit users and make the directory password protected.
The first thing you need to do is mark the check mark box Password protect this directory and give the folder a name. You can see I named mine: This is a test. If a user goes to the URL of this folder, this name will be displayed when the password is being requested. Click save and you see a screen telling you that permissions on that folder have been upgraded.
Next users need to be added to the account. Just create a user name and password, then click:
Add/modify authorized user. (This is also used to change a users password. Just enter the user name that you want to change then give them a new password.) As you can see in the window there is already a user “tester” displayed in the window below the add user section. If you need to delete a user, just select them and click the delete button.
If you go back to the main folder selection screen you can see what folders are password protected by the lock symbol next to their name.
To test the settings go to the URL of the folder. Mine is http://stats.tiger.arvixe.com/SECURITY and it will ask you for the password. Enter your password and you are in. You have successfully created a password protected directory.