Click to See Complete Forum and Search --> : forbidden user directory
airedale
03-25-2002, 02:35 AM
Hello, I am currently working on getting my box setup so that I can let users have accounts and they can get to their site by going to: http://ipaddress/~theirname/
After I created a user, I put an HTML file in thier directory. Then when I tried to access thier website by typing in: http://ipddress/~username/, I got a Forbidden thing saying I was not authorized to do it.
How do I turn that off so that by having the /~thiername/ directory working to show thier worked on webpages.
Thanks,
Adam
Choozo
03-25-2002, 06:26 AM
Check your httpd.conf file, and enable the 'mod_user.c' directive. This is usually set to read files in ~/public_html so you need to have the 'public_html' directory in every users home dir.
Ryeker
03-26-2002, 05:23 AM
In addition to Choozo's reply, always check your logs. It will tell you EXACTLY what it's trying to do. Both access and error-log.
airedale
03-26-2002, 12:31 PM
Thanks for the reply's I tried putting in the public_html directory into my users directory and I am still getting the same error. Even if I didn't have an index.html file in there, I should still be seeing a directory listing, right? I keep getting the forbidden error... :mad:
Thanks for all of the input!
Choozo
03-26-2002, 04:12 PM
How are the mode set on the 'public_html' directory (it should be something like rwxr-xr-x (that is read/write/execute for owner, read/execute for group and world))?
Did you check/edit the httpd.conf file (if you edited the file, you need to restart Apache)?
iDxMan
03-26-2002, 08:38 PM
Sample directory entry :
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
Without giving the indexes option to that directory it wont work. What did httpd-error.log say? Something about directory index forbidden?
-r
airedale
03-27-2002, 02:20 AM
I actually set the mode to 777 just to make sure. Also, I tried putting in a directory part into the httpd.conf file and it didn't do anything either. I restarted apache too, just so you know. I am still forbidden to so it!
airedale
03-27-2002, 01:51 PM
Ok, I checked my access log, and this is what it said when I tried to access /~boogs/
131.156.67.83 - - [27/Mar/2002:11:44:16 -0600] "GET /~boogs/ HTTP/1.1" 403 318 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)"
Then I tried it w/ out the ~ and this is what the access log shows:
131.156.67.83 - - [27/Mar/2002:11:44:51 -0600] "GET /boogs/ HTTP/1.1" 404 313 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)"
Also after doing that last one, the error_log showed this:
[Wed Mar 27 11:44:51 2002] [error] [client 131.156.67.83] File does not exist: /var/www/html/boogs/
So, what is the next step that I should take?! Should I post my two config files? httpd.conf and commonhttpd.conf?
Thanks!
Adam
iDxMan
03-28-2002, 08:20 PM
It still seems to lie in the <directory> section in httpd.conf
Where in the file did you add it? Perhaps right under something like :
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
-r
Ryeker
03-30-2002, 02:57 AM
Was Apache restarted?
apachectl restart