Jump to content

Password Protecting A Directory Via Cpanel


iowamf

Recommended Posts

Greetings -

 

I'm setting up some forums and would like to give a limited set of people a test drive - so I tried to turn on the password protection by directory via cpanel.

 

cpanel -> "Password Protect Directories"

 

selected the "forum" subdir

 

/home/my_acct/public_html/forum

 

[*] Directory requires a password to access via the web (you must check this to activate password protection).

 

Protected Resource Name (will display in browser's password mask): my_domain

 

Added a user:

 

joe_tester

joes_password

 

Originally, when I went to http:/mydomain/forum - I got the forum.

Now, after password protecting when I go to http:/mydomain/forum - I get "page not found".

 

I thought this cpanel feature should issue a prompt for "joe_tester" to enter his password and access the forums?

Link to comment
Share on other sites

The correct thing that would happen is that your visitors will get a box asking them to enther both the username and password for the protected directory.

 

Password protect another test directory with just a normal html page inside it (no forum etc). If that directory behaves in the same way (you getting a 404 error etc), then open a ticket and ask the techs to look at it.

 

If it works as it should, then we can go from there.

Link to comment
Share on other sites

  • 1 month later...

Is there any way to password-protect a directory without requiring a user name? I want to be able to give a group of people the password, but thought I'd save them the trouble of also typing/remembering a username.

 

Maybe a CGI script out there?

Link to comment
Share on other sites

While having only a password and not also a username would lower the security (I think), I would set the username and password to the same word (or combination of signs, numbers etc). This way they would only need to remember one thing, but writing it twice.

 

But there may be a better way to do this, so hold on, there may be someone who knows. :P

Link to comment
Share on other sites

How much security are you really wanting? I mean, there are some really simple solutions out there; you could modify a php script to require some input from the user, and check that against your set password. If they matched, it would let them in, and if it didn't they wouldn't.

 

There are also some scripts I've seen that protect content, but they are pretty easy to hack (some even have the available passwords as an array in the javascript file--which you can set as a separate file, but its certainly not secure but it would keep out the casual web visitor).

 

So I guess the answer depends on the level of security you are looking for. If you don't mind if people can semi-easily hack their way in, then there are some really easy options using javascript

 

If you are wanting more secuirty, you'll probably want to find something in php (which keeps the password in a separate php file, which won't be readable to any web visitors), or similar. I'm guessing this wouldn't be that hard to write for an experienced PHP person.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...