How do I create user name/password protect dirs on Apache server?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eastcoastguyz

    #1

    How do I create user name/password protect dirs on Apache server?

    On an Apache server, I want to be able to have a user name/password
    directory. I know this can be done with .htaccess, but I want to be
    able to do this for multiple users. The purpose of this, is that from
    the web page, I want clients to be able to have their own user name and
    password, which would grant them access to their own web page which
    would contain their client files for them to download.

    How can this best be accomplished considering I can't be root on the
    web server? I was thinking maybe this can be done in PHP? Thanks in
    advance for any help/suggestions!

  • Tim Van Wassenhove

    #2
    Re: How do I create user name/password protect dirs on Apache server?

    On 2005-08-01, eastcoastguyz <eastcoastguyz@ hotmail.com> wrote:[color=blue]
    > On an Apache server, I want to be able to have a user name/password
    > directory. I know this can be done with .htaccess, but I want to be
    > able to do this for multiple users.[/color]

    Why do you think .htpasswd can't contain multiple user/pass
    combinations?

    (Btw, a simple search in this newsgroup on password protected area will
    return many other informative threads.)


    --
    Met vriendelijke groeten,
    Tim Van Wassenhove <http://timvw.madoka.be >

    Comment

    • Gordon Burditt

      #3
      Re: How do I create user name/password protect dirs on Apache server?

      >On an Apache server, I want to be able to have a user name/password[color=blue]
      >directory.[/color]

      A directory with only names and passwords in it?
      [color=blue]
      >I know this can be done with .htaccess, but I want to be
      >able to do this for multiple users. The purpose of this, is that from
      >the web page, I want clients to be able to have their own user name and
      >password, which would grant them access to their own web page which
      >would contain their client files for them to download.[/color]

      Give each user their own directory, with their own .htaccess file
      and their own password file to go with it.

      A web page to control this stuff would have to deal with access
      control for uploading files (so user A can't upload stuff into
      user B's directory), creating users, and changing passwords.

      How you control letting user A upload a PHP page, which is then
      run, but DON'T let him deface user B's pages or steal his customer
      list is a problem.
      [color=blue]
      >How can this best be accomplished considering I can't be root on the
      >web server? I was thinking maybe this can be done in PHP? Thanks in
      >advance for any help/suggestions![/color]

      Probably all the web user directories will be owned by the Apache
      user (and these users probably won't HAVE system accounts). You
      won't need root to manage that.

      Gordon L. Burditt

      Comment

      • DXTrim

        #4
        Re: How do I create user name/password protect dirs on Apache server?

        ..htaccess would not be the best solution. I do this using a DB, an
        authentication form which checks on the DB for the right user, retrieves the
        user id and based on that ID displays the files of that particular user.

        Cheers,

        DXTrim

        "eastcoastg uyz" <eastcoastguyz@ hotmail.com> wrote in message
        news:1122862998 .095711.212630@ g47g2000cwa.goo glegroups.com.. .[color=blue]
        > On an Apache server, I want to be able to have a user name/password
        > directory. I know this can be done with .htaccess, but I want to be
        > able to do this for multiple users. The purpose of this, is that from
        > the web page, I want clients to be able to have their own user name and
        > password, which would grant them access to their own web page which
        > would contain their client files for them to download.
        >
        > How can this best be accomplished considering I can't be root on the
        > web server? I was thinking maybe this can be done in PHP? Thanks in
        > advance for any help/suggestions!
        >[/color]


        Comment

        Working...