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 ...
- 06-23-2004 #1Just 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
- 06-24-2004 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Try looking for clues in Apache's error_log file.
- 06-24-2004 #3Just 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.
- 06-24-2004 #4Linux 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.
- 06-24-2004 #5
644 is the best permissions IMHO I always have all my files under the web root chmod'd to 644 (Exept cgi stuff).
- 06-24-2004 #6Just 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
- 06-24-2004 #7Linux 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.
- 06-24-2004 #8Just 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?
- 06-25-2004 #9Linux 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?


Reply With Quote
