Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Login to access folders

Discussion in 'Security' started by goble2, Nov 23, 2016.

  1. goble2

    goble2 Registered

    Joined:
    Dec 16, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Hello,

    sorry if I'm posting in the wrong section. I have some websites that I want to prevent public access. Let's say all these sites are in subfolders of sub.domain.com i.e. site 1: sub.domain.com/1, site 2: sub.domain.com/2 and so on.

    I want people to insert a password (with or without username) before accessing sub.domain.com/1, the same credentials will apply to all sites.

    The credentials window can be triggered by the browser itself like it's the case when you try to access a non public FTP site in your browser.

    Does cPanel offer that function ?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,769
    Likes Received:
    313
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    In your cPanel, under the Files section, find the Directory Privacy tool.
     
  3. goble2

    goble2 Registered

    Joined:
    Dec 16, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
  4. goble2

    goble2 Registered

    Joined:
    Dec 16, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Hello, it's working now...

    A quick one: Is there any relation between a cpanel user and a Joomla user ?
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,769
    Likes Received:
    313
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You shouldn't need to change permissions to password protect a directory.

    Assuming you've never added a user to this directory before here, you might have missed a step. Once you've selected a directory by clicking the name of it, entered a name for it, added your username and password for it, and then saved, you're not done yet.
    Go back to the Directory Privacy area in your cPanel, you may notice there is no lock on the directory you just setup.
    Click the name of the directory here again, this time just add a name for it at top, and tick the box to "Password protect this directory" leaving all other forms below empty, and hit that save button instead.

    Back on the Directory Privacy page you should see the lock now. Close out your browser, open a new instance and check the password protected directory: sub.example.com/mystage/

    The Directory Privacy page is two steps. The first time you add a user, the second time you actually set the lock.

    No clue if any of that is of use to you or not. ;)
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,769
    Likes Received:
    313
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Great! None what-so-ever. You shouldn't use your cPanel username and cPanel password for anything other than cPanel, either.
     
Loading...

Share This Page