To protect a folder with a password through cPanel control panel, follow these steps:
Step One: Access Directory Protection Tool
- Log into your cPanel control panel
- Navigate to the "Directory Privacy" section by clicking on its icon

Step Two: Locate the Directory
- Go to the website folder public_html to select the directory that will be protected

Step Three: Choose Directory to Protect
- Select the directory you want to protect (in this example we'll choose the
cgi-bin
folder)

Step Four: Enable Password Protection
- From the "Security Settings" section, enable the option next to "Password protect this directory" to protect the folder with a password

Note: You can also add a name for the protected directory in the "Name this protected directory" field to display to visitors when requesting the password.
Step Five: Create New User
- In the "Create User" section, create a username and set a password for it
- Enter your desired username in the "Username" field
- Enter the password in the "Password" field
- Click "Save" to complete the directory protection

Managing Users and Permissions
After creating the protection, you can:
- Add new users: To grant access to other people
- Modify passwords: To update security credentials
- Delete users: To revoke access permissions
- Remove protection: To remove password protection from the directory
Warning: Save the user credentials (username and password) in a secure location. You'll need them to access the protected directory later.
Security Tip: Use a strong password containing uppercase and lowercase letters, numbers, and symbols to ensure better security for the protected directory.