Find the answer to your Linux question:
Results 1 to 9 of 9
Trying to set up /home/httpd/mydomain/customer with .htaccess. When I type "http://www.mydomain.com/customer" I get get the following error message. 403 message Forbidden You don't have permission to access /customer on this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5

    403 Forbidden message - Using .htaccess for a folder on the


    Trying to set up /home/httpd/mydomain/customer with .htaccess. When I type "http://www.mydomain.com/customer" I get get the following error
    message.

    403 message
    Forbidden
    You don't have permission to access /customer on this server.

    I have setup the following files in this order ...

    - created the .htaccess file under "home/httpd/mydomain/customer" with the follwoing code:
    AuthUserFile /home/httpd/mydomain/passfile
    AuthName " Auth User"
    AuthType Basic

    require valid-user

    - created the password file called "passfile" under "home/httpd/mydomain/" with the follwoing code:
    jack:VfKwMBtj/n/c.

    - added the following code to the "httpd.conf"
    <Directory "/home/httpd/mydomain/customer">
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>

    - and restarted Apache: # /etc/init.d/httpd restart

    Please help

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Try looking for clues in Apache's error_log file.

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5

    403 Forbidden message - Using .htaccess for a folder on the

    Thanks for the reply. It now works, all I had to do was to change the diretory CHMOD to 700; with user owner and group to Apache. I don't know whether this is a good practice or not? Safe or not?

    Thanks. Please reply.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Well, with the user set to apache, it's probably safe. You may want to change it to 750, user root and group apache, though. That way, root can still admin it properly (without actually abusing superuser privileges, that is), and apache won't be able to write to it, which is probably a good thing.

  6. #5
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    644 is the best permissions IMHO I always have all my files under the web root chmod'd to 644 (Exept cgi stuff).

  7. #6
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5

    403 Forbidden message - Using .htaccess for a folder on the

    I tried chmod 644 and I get a "403 Forbidden message" with owner root and group Apache. As per "Dolda2000" When I go back to chmod 750; everthing works fine

  8. #7
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    It would be unwise to chmod a directory to 644 - that means everyone can read the contents, but noone can access them. On directories, execute permission means the permission to "traverse" that directory.

  9. #8
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5

    403 Forbidden message - Using .htaccess for a folder on the

    It is 750.

    Another question.

    Once Username and Password entered, any leads on how to direct that particular user to their own "private" directory? Is the answer the use of "AuthDBMUserFile". If yes. Where is a good place to start looking for How to?

  10. #9
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    How about using a CGI, Perl or PHP script to redirect the user according to his login name?

Posting Permissions

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