Password protecting directories should error when it doesn't work.

spaceman

Well-Known Member
Mar 25, 2002
517
8
318
I was just trying to use cPanel to password protect a directory. Even though cPanel was saying "yes, it's been done" (or words to that effect), it wasn't because (I worked out that) folder permissions didn't allow the .htaccess file to be written.

So I'm suggesting that the coding that attempts to write that .htaccess file should be made more intelligent - if it cannot be written (and therefore .htaccess protection is not in place), then this should be reported at the time. It shouldn't say "job done" when it hasn't been done.

A minor, non-essential issue, but worthwhile reporting I feel.

:)

cPanel.net Support Ticket Number: 35012
 

Devil Inside

Well-Known Member
Apr 4, 2003
276
0
166
speaking of...

anyone else having issues with this feature not working?

I'm using 8.5.5 R60

no matter what I do I can not get the directory to be pass protected.

public_html/test/

so I know it's not the ol *can't protect root dir* issue.
 

easyhoster1

Well-Known Member
Sep 25, 2003
656
0
166
Here is what I found.

1.) You cannot protect a directorie unless something is loaded to it. The index.html page must be loaded first before protecting it.

2.) If the user tries to change the username and password
and deletes the primary first and then adds the new user after to that directory, it will fail, all that is needed is to unlock the directory and re-lock it.

Hope this helps and works for us.

Thanks
 
Last edited:

Devil Inside

Well-Known Member
Apr 4, 2003
276
0
166
the user was trying to install into a subdomain's directory.

sub.domain.com/dir

which isn't possible. They didn't tell me that at first ;)
 

nickn

Well-Known Member
PartnerNOC
Jun 15, 2003
616
1
168
Otherwise, your password protection doesn't work at all?

Paste the .htaccess in the directory you are trying to protect here.
 

Website Rob

Well-Known Member
Mar 23, 2002
1,501
1
318
Alberta, Canada
cPanel Access Level
Root Administrator
I have never found Cpanel to be very good when creating or working with .htaccess files.

This thread is a good example of that. Both, Index Mgr. & Web protect work the same way; prevent viewing of a directory.

Options All -Indexes

Is the code used by both and is incorrect for providing Authorized or Restricted access. For that you need to manually code the .htaccess file correctly.
 

roxana

Registered
Apr 15, 2004
3
0
151
Originally posted by easyhoster1
Here is what I found.

1.) You cannot protect a directorie unless something is loaded to it. The index.html page must be loaded first before protecting it.
thank youu!! :D