This is a discussion on "public_html" for each user don"t work. within the Apache Web Server forums, part of the Web Server and Related Forums category; Dear Sir, I used Apache/2.0.52 that come with Fedora Core 3. I want to config "public_html&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Dear Sir,
I used Apache/2.0.52 that come with Fedora Core 3. I want to config "public_html" for each user in file "httpd.conf" but don"t work. I config httpd.conf below. #UserDir disable UserDir public_html #<Directory /home/*/public_html> # AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # <Limit GET POST OPTIONS> # Order allow,deny # Allow from all # </Limit> # <LimitExcept GET POST OPTIONS> # Order deny,allow # Deny from all # </LimitExcept> #</Directory> When used IE browser to access "http://x.x.x.x/~manuser", it has error message in "error_log" show below. [Tue Jun 27 18:55:55 2006] [error] [client 250.168.180.156] (13) Permission denied: access to /~manuser/ denied And error message in IE browser show below. Forbidden You don't have permission to access /~manuser/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. More detail about permission in home directory show below. # ls -ld /home drwx--x--x 7 root root 4096 Jun 26 15:17 /home # ls -ld /home/manuser/ drwx--x--x 6 manuser manuser 4096 Jun 27 17:23 /home/manuser/ # ls -ld /home/manuser/public_html/ drwxr-xr-x 2 manuser manuser 4096 Jun 27 17:23 /home/manuser/public_html/ Please let me know how to solve this problem. Thanks & Best Regards, Tom. |
|
|||
|
pom2001 schrieb am 27.06.2006 14:26:
> Dear Sir, > I used Apache/2.0.52 that come with Fedora Core 3. I want to config > "public_html" for each user in file "httpd.conf" but don"t work. > I config httpd.conf below. > #UserDir disable > UserDir public_html > > #<Directory /home/*/public_html> > # AllowOverride FileInfo AuthConfig Limit > # Options MultiViews Indexes SymLinksIfOwnerMatch > IncludesNoExec > # <Limit GET POST OPTIONS> > # Order allow,deny > # Allow from all > # </Limit> > # <LimitExcept GET POST OPTIONS> > # Order deny,allow > # Deny from all > # </LimitExcept> > #</Directory> > > When used IE browser to access "http://x.x.x.x/~manuser", > it has error message in "error_log" show below. > > [Tue Jun 27 18:55:55 2006] [error] [client 250.168.180.156] (13) > Permission denied: access to /~manuser/ denied > > And error message in IE browser show below. > > Forbidden > You don't have permission to access /~manuser/ on this server. > Additionally, a 403 Forbidden error was encountered while trying > to use an ErrorDocument to handle the request. > > More detail about permission in home directory show below. > # ls -ld /home > drwx--x--x 7 root root 4096 Jun 26 15:17 /home > # ls -ld /home/manuser/ > drwx--x--x 6 manuser manuser 4096 Jun 27 17:23 /home/manuser/ > # ls -ld /home/manuser/public_html/ > drwxr-xr-x 2 manuser manuser 4096 Jun 27 17:23 > /home/manuser/public_html/ > > Please let me know how to solve this problem. > Thanks & Best Regards, > Tom. > Tom, because you did not uncomment the <Directory /home/*/public_html> section, those public_html directories inherit their (access) rigthts from / - and this is "deny from all". You should uncomment the lines in this section, restart apache and see what happens. HTH, Werner |
|
|||
|
I config again that show below but still problem.
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS> Order allow,deny Allow from all </Limit> # <LimitExcept GET POST OPTIONS> # Order deny,allow # Deny from all # </LimitExcept> </Directory> How to solve ? Thanks & Best Regards, Tom. Werner Flamme wrote: > pom2001 schrieb am 27.06.2006 14:26: > > Dear Sir, > > I used Apache/2.0.52 that come with Fedora Core 3. I want to config > > "public_html" for each user in file "httpd.conf" but don"t work. > > I config httpd.conf below. > > #UserDir disable > > UserDir public_html > > > > #<Directory /home/*/public_html> > > # AllowOverride FileInfo AuthConfig Limit > > # Options MultiViews Indexes SymLinksIfOwnerMatch > > IncludesNoExec > > # <Limit GET POST OPTIONS> > > # Order allow,deny > > # Allow from all > > # </Limit> > > # <LimitExcept GET POST OPTIONS> > > # Order deny,allow > > # Deny from all > > # </LimitExcept> > > #</Directory> > > > > When used IE browser to access "http://x.x.x.x/~manuser", > > it has error message in "error_log" show below. > > > > [Tue Jun 27 18:55:55 2006] [error] [client 250.168.180.156] (13) > > Permission denied: access to /~manuser/ denied > > > > And error message in IE browser show below. > > > > Forbidden > > You don't have permission to access /~manuser/ on this server. > > Additionally, a 403 Forbidden error was encountered while trying > > to use an ErrorDocument to handle the request. > > > > More detail about permission in home directory show below. > > # ls -ld /home > > drwx--x--x 7 root root 4096 Jun 26 15:17 /home > > # ls -ld /home/manuser/ > > drwx--x--x 6 manuser manuser 4096 Jun 27 17:23 /home/manuser/ > > # ls -ld /home/manuser/public_html/ > > drwxr-xr-x 2 manuser manuser 4096 Jun 27 17:23 > > /home/manuser/public_html/ > > > > Please let me know how to solve this problem. > > Thanks & Best Regards, > > Tom. > > > Tom, > > because you did not uncomment the <Directory /home/*/public_html> section, > those public_html directories inherit their (access) rigthts from / - and > this is "deny from all". You should uncomment the lines in this section, > restart apache and see what happens. > > HTH, > Werner |
|
|||
|
pom2001 napisa³(a):
> I config again that show below but still problem. > > <Directory /home/*/public_html> you mean: <Directory ~"/home/[^/]+/public_html"> Check for documentation: http://httpd.apache.org/docs/2.0/mod...html#directory > AllowOverride FileInfo AuthConfig Limit > Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec > <Limit GET POST OPTIONS> > Order allow,deny > Allow from all > </Limit> > # <LimitExcept GET POST OPTIONS> > # Order deny,allow > # Deny from all > # </LimitExcept> > </Directory> > > How to solve ? Does your Apache has the right to access 'public_html' folders? Check, if users' homedirectories have at least 0711 mode. And another thing: http://httpd.apache.org/docs/2.0/mod...#allowoverride "Only available in <Directory> sections AllowOverride is valid only in <Directory> sections specified without regular expressions, not in <Location>, <DirectoryMatch> or <Files> sections." So you'll have to put something like: <Directory /home> AllowOverride FileInfo AuthConfig Limit </Directory> either. |
|
|||
|
I"m still problem.
Can not access "http://xxx.xxx.xxx.xxx/~manuser" on Fedora Core 3 with Apache/2.0.52. It has error in "error_log" show below, [Wed Jun 28 18:31:08 2006] [error] [client 210.168.195.131] (13)Permission denied: access to /~manuser denied My "httpd.conf" show below. http://203.121.168.10/httpd.conf.txt Other information on my Linux Server show below. # grep manuser /etc/passwd manuser:x:500:500:Man USER:/home/manuser:/bin/bash # ls -ld /home drwxr-xr-x 7 root root 4096 Jun 28 09:53 /home # ls -ld /home/manuser/ drwxr-xr-x 6 manuser manuser 4096 Jun 27 17:23 /home/manuser/ # ls -ld /home/manuser/public_html/ drwxr-xr-x 2 manuser manuser 4096 Jun 27 17:23 /home/manuser/public_html/ Have any idea ? Tom. faxe wrote: > pom2001 napisa³(a): > > I config again that show below but still problem. > > > > <Directory /home/*/public_html> > > you mean: <Directory ~"/home/[^/]+/public_html"> > > Check for documentation: > http://httpd.apache.org/docs/2.0/mod...html#directory > > > AllowOverride FileInfo AuthConfig Limit > > Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec > > <Limit GET POST OPTIONS> > > Order allow,deny > > Allow from all > > </Limit> > > # <LimitExcept GET POST OPTIONS> > > # Order deny,allow > > # Deny from all > > # </LimitExcept> > > </Directory> > > > > How to solve ? > > Does your Apache has the right to access 'public_html' folders? Check, > if users' homedirectories have at least 0711 mode. And another thing: > > http://httpd.apache.org/docs/2.0/mod...#allowoverride > "Only available in <Directory> sections > AllowOverride is valid only in <Directory> sections specified without > regular expressions, not in <Location>, <DirectoryMatch> or <Files> > sections." > > So you'll have to put something like: > > <Directory /home> > AllowOverride FileInfo AuthConfig Limit > </Directory> > > either. |
|
|||
|
Hi Tom,
I have seen that you have not configured any virtual host on your apache. I think if you tried below code, it may be useful for you: ------------------- <VirtualHost xx.xx.xx.xx> ServerAlias domainname.com ServerAdmin webmaster@domainname.com DocumentRoot /home/hoemdir/public_html BytesLog /your/log/path ServerName www.domainname.com User username Group groupname CustomLog /your/log/path combined </VirtualHost> ---------------- Change your domainname.com with your domain name and username with the correct username I think in this case it may be manuser and homedir with your user's home directory that path may like: /home/manuser/public_html/ Have a try from your end. Regards, Manuel S. -------------------- pom2001 wrote: > I"m still problem. > Can not access "http://xxx.xxx.xxx.xxx/~manuser" on > Fedora Core 3 with Apache/2.0.52. > It has error in "error_log" show below, > > [Wed Jun 28 18:31:08 2006] [error] [client 210.168.195.131] > (13)Permission > denied: access to /~manuser denied > > My "httpd.conf" show below. > http://203.121.168.10/httpd.conf.txt > > Other information on my Linux Server show below. > # grep manuser /etc/passwd > manuser:x:500:500:Man USER:/home/manuser:/bin/bash > > # ls -ld /home > drwxr-xr-x 7 root root 4096 Jun 28 09:53 /home > > # ls -ld /home/manuser/ > drwxr-xr-x 6 manuser manuser 4096 Jun 27 17:23 /home/manuser/ > > # ls -ld /home/manuser/public_html/ > drwxr-xr-x 2 manuser manuser 4096 Jun 27 17:23 > /home/manuser/public_html/ > > Have any idea ? > Tom. > > faxe wrote: > > pom2001 napisa³(a): > > > I config again that show below but still problem. > > > > > > <Directory /home/*/public_html> > > > > you mean: <Directory ~"/home/[^/]+/public_html"> > > > > Check for documentation: > > http://httpd.apache.org/docs/2.0/mod...html#directory > > > > > AllowOverride FileInfo AuthConfig Limit > > > Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec > > > <Limit GET POST OPTIONS> > > > Order allow,deny > > > Allow from all > > > </Limit> > > > # <LimitExcept GET POST OPTIONS> > > > # Order deny,allow > > > # Deny from all > > > # </LimitExcept> > > > </Directory> > > > > > > How to solve ? > > > > Does your Apache has the right to access 'public_html' folders? Check, > > if users' homedirectories have at least 0711 mode. And another thing: > > > > http://httpd.apache.org/docs/2.0/mod...#allowoverride > > "Only available in <Directory> sections > > AllowOverride is valid only in <Directory> sections specified without > > regular expressions, not in <Location>, <DirectoryMatch> or <Files> > > sections." > > > > So you'll have to put something like: > > > > <Directory /home> > > AllowOverride FileInfo AuthConfig Limit > > </Directory> > > > > either. |
|
|||
|
pom2001 wrote:
> # ls -ld /home > drwxr-xr-x 7 root root 4096 Jun 28 09:53 /home > > # ls -ld /home/manuser/ > drwxr-xr-x 6 manuser manuser 4096 Jun 27 17:23 /home/manuser/ > > # ls -ld /home/manuser/public_html/ > drwxr-xr-x 2 manuser manuser 4096 Jun 27 17:23 > /home/manuser/public_html/ > > Have any idea ? I copied your httpd.conf, run Apache with it and it worked fine. I've got the same access permissions for /home, ~ and ~/public_html. My last guess is that index.html inside the public_html/ directory isn't readable by "apache" system user. In that case I get: [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /home/faxe/public_html/index.html in my error_log (Apache 2.2 adds additional info about source of the error). This should fix the problem: $ chmod -R 744 /home/manuser/public_html >> you mean: <Directory ~"/home/[^/]+/public_html"> Err, that wasn't quite true - your UNIX-like wildcard path was correct and you can legally use AllowOverride inside such <Directory> block. -- Pawel Zdziarski |
|
|||
|
faxe wrote:
> pom2001 wrote: > > > # ls -ld /home > > drwxr-xr-x 7 root root 4096 Jun 28 09:53 /home > > > > # ls -ld /home/manuser/ > > drwxr-xr-x 6 manuser manuser 4096 Jun 27 17:23 /home/manuser/ > > > > # ls -ld /home/manuser/public_html/ > > drwxr-xr-x 2 manuser manuser 4096 Jun 27 17:23 > > /home/manuser/public_html/ > > > > Have any idea ? > > I copied your httpd.conf, run Apache with it and it worked fine. I've > got the same access permissions for /home, ~ and ~/public_html. My last > guess is that index.html inside the public_html/ directory isn't > readable by "apache" system user. In that case I get: > > [error] [client 127.0.0.1] (13)Permission denied: file permissions deny > server access: /home/faxe/public_html/index.html > > in my error_log (Apache 2.2 adds additional info about source of the > error). This should fix the problem: > > $ chmod -R 744 /home/manuser/public_html > > >> you mean: <Directory ~"/home/[^/]+/public_html"> > > Err, that wasn't quite true - your UNIX-like wildcard path was correct > and you can legally use AllowOverride inside such <Directory> block. > > -- > Pawel Zdziarski Now user that have home directory under "/home" is working well, but user that have home directory under "/office" don"t work. When access "http://xxx.xxx.xxx.xxx/~supply ", in "error_log" show below. [Fri Jun 30 20:56:26 2006] [error] [client 226.168.151.53] (13)Permission denied: access to /~supply denied My "httpd.conf" show below http://203.121.168.10/httpd.conf.txt My information about user "supply" show below. http://203.121.168.10/supply-user.txt Have any idea ? Tom. |
|
|||
|
pom2001 napisa³(a):
> [Fri Jun 30 20:56:26 2006] [error] [client 226.168.151.53] > (13)Permission > denied: access to /~supply denied Again, I've copied your directives, created the same hierarchy of directories, added new user, created public_html and chmoded it... and it works correctly. At first moment I forgot to add "Options FollowSymlinks" to <Directory /> block and thought that was the problem - but after doing so there was no problem at all... creepy. Here's my environment: http://p-zet.webpark.pl/env.txt Forgotten .htaccess left somewhere, maybe? -- Pozdrawiam / Best regards Pawel Zdziarski gmail: faxepl |
|
|||
|
faxe เขียน:
> pom2001 napisa³(a): > > > [Fri Jun 30 20:56:26 2006] [error] [client 226.168.151.53] > > (13)Permission > > denied: access to /~supply denied > > Again, I've copied your directives, created the same hierarchy of > directories, added new user, created public_html and chmoded it... and > it works correctly. At first moment I forgot to add "Options > FollowSymlinks" to <Directory /> block and thought that was the problem > - but after doing so there was no problem at all... creepy. > > Here's my environment: http://p-zet.webpark.pl/env.txt > > Forgotten .htaccess left somewhere, maybe? > I don"t understand. How about .htaccess and do you mean to config "httpf.conf" below. <Directory /> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec FollowSymlinks <Limit GET POST OPTIONS> Order allow,deny Allow from all </Limit> </Directory> Please tell me more detail because the first time for me to config Apache 2.x. Hope you can help me. Best Regards, Tom. |