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.

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

Discussion in 'General Discussion' started by spaceman, Jan 12, 2004.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  2. Devil Inside

    Devil Inside Well-Known Member

    Joined:
    Apr 4, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  3. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    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
     
    #3 easyhoster1, Jan 16, 2004
    Last edited: Jan 16, 2004
  4. Devil Inside

    Devil Inside Well-Known Member

    Joined:
    Apr 4, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    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 ;)
     
  5. TRAIN YARD SOFTWARE

    TRAIN YARD SOFTWARE Well-Known Member

    Joined:
    Dec 20, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    will index.php work? or does it need to be .html to work?
     
  6. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    Yes..index.php would work as well :)
     
  7. TRAIN YARD SOFTWARE

    TRAIN YARD SOFTWARE Well-Known Member

    Joined:
    Dec 20, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    i tested, .php and .html and neither works
     
  8. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    Otherwise, your password protection doesn't work at all?

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

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    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.
     
  10. TRAIN YARD SOFTWARE

    TRAIN YARD SOFTWARE Well-Known Member

    Joined:
    Dec 20, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    and because this doesnt work, the new Pro feature Leach is useless.
     
  11. roxana

    roxana Registered

    Joined:
    Apr 15, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    thank youu!! :D
     
  12. magin

    magin Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    45
    Likes Received:
    1
    Trophy Points:
    6
    This feature is not working on my server, i cant protect forlders, what can i do to fix it?
     
Loading...

Share This Page