Results 1 to 5 of 5

Thread: apache auth

  1. #1

    apache auth

    I keep getting a 403 when I try to go to any of my password protected folder, one is done with .htaccess, and one is done in the httpd.conf, here's the content of my .htaccess:
    Code:
    AuthUserFile $file
    AuthGroupFile /dev/null
    AuthName Password
    AuthType Basic
    
    require valid-user
    the folder is 750: nobody:users (apache runs as nobody, I plan on changing this to "apache&quot
    the other one looks like this
    Code:
    <Directory "$name">
        Options FollowSymLinks
        AuthType Basic
        AuthName "If you're not me, get out"
        AuthUserFile "$passfile"
        Require valid-user
    </Directory>
    With same permissions.
    I read somewhere that chmodding to 750 fixes this, but it didn't for me.
    Thanks.

  2. #2
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:apache auth

    A few comments ...

    With .htaccess file, you need this directive.
    Code:
     AllowOverride AuthConfig
    Did you create user's password file? And place it other than root directory of Apache? Like so ...

    Code:
     htpasswd -c /usr/local/apache/passwd/passwords countach44
    Where the countach44 is the name that you will have to put in to have access to that directory.

    Also, give explicit file location ( for ease of use ) instead of using short file names like
    Code:
    AuthUserFile "/usr/local/apache/$passfile"
    Instead of
    Code:
    AuthUserFile "$passfile"
    You also need to explicitly define what user you are going to allow to have access to the directory.
    For example;
    Code:
    require user countach44
    HTH ...
    P.S --> The above are for apache 2.0.

  3. #3

    Re:apache auth

    I'm using apache 1.3 series, and I've done all of that... Also, whenever I try to list any directory (by just going to that directory) it gives me 403, I've been looking, but I can't remember how to change it to allow directory viewing.
    Thanks

  4. #4
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:apache auth

    [quote author=Corrupt Countach44 link=board=4;threadid=9451;start=0#msg85780 date=1088917036]
    how to change it to allow directory viewing.
    [/quote]
    It's controlled by mod_autoindex. Hereis more info for the directive setting

  5. #5
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:apache auth

    [quote author=Corrupt Countach44 link=board=4;threadid=9451;start=0#msg85678 date=1088740899]
    here's the content of my .htaccess:
    Code:
    require valid-user
    the other one looks like this
    Code:
    <Directory "$name">
        Require valid-user
    </Directory>
    [/quote]
    It's not sufficient to have only that "valid-user". You need to specify specific users for whom it's allowed.
    I read somewhere that chmodding to 750 fixes this
    As I recall, it's 640.

Similar Threads

  1. LDAP auth with apache on FC5 & FC6
    By chithu in forum Redhat / Fedora
    Replies: 0
    Last Post: 11-30-2006, 11:58 AM
  2. SMTP Auth?
    By Tyr_7BE in forum Linux - Hardware, Networking & Security
    Replies: 9
    Last Post: 10-06-2004, 03:14 PM
  3. apache auth
    By countach44 in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 05-20-2004, 04:15 AM
  4. Apache error: could not open dbm (type GDBM) auth file
    By infinite_root in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 03-24-2004, 03:16 AM
  5. auth service
    By -JhAzEr- in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 09-19-2002, 07:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •