Page 1 of 1

Url always says Forbidden

Posted: 2010-02-03 15:21
by msgbeep
Hello,

Server is Ubuntu
Webserver is Apache2

my friend has an alias in httpd.conf for his dir.
i wrote one for too for mine dir.
his works mine not.

The Server Message is:
You don't have permission to access $PATH on this server.

:evil:

Error Log:
client denied by server configuration /home/user/public_html

httpd.conf:

Code: Select all

<Directory />
    Options None
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

AddType application/x-httpd-php	.php .php3. php4
AddType .php text/html .shtml

DirectoryIndex at_domains_index.html index.html index.shtml index.htm

Alias /chaos "/home/chaos/public_html"
<Directory "/home/chaos/public_html">
    Options Indexes MultiViews FollowSymlinks
    RewriteEngine On
    
    RewriteRule ^/?sid[a-z]*([a-zA-Z0-9,-]{32}|[a-zA-Z0-9,-]{40})(./*) $2 [QSA]
    
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Alias /cromatic "/home/cromatic/public_html"
<Directory "/home/cromatic/pubilc_html">
    Options Indexes MultiViews FollowSymlinks
    RewriteEngine On

    RewriteRule ^/?sid[a-z]*([a-zA-Z0-9,-]{32}|[a-zA-Z0-9,-]{40})(./*) $2 [QSA]

    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

# Alias /phpmyadmin ""
# <Directory "">
#	Options Indexes MultiViews
#	AllowOverride None
#	Order allow,deny
#	Allow from all
#</Directory>

# includes the icons
Include /etc/apache2/autoindex-defaults.conf
I make a symlink from a directory inside of my pubilc_home to his.
Wow that works. But only that way. Why not the direct one ?

Any tips or hints ?
All rights (permissions) are set, otherwise the symlink wont work.

thx for help
msgbeep

ps: a restart after editing httpd.conf doesnt matter the problem. ](*,)

Re: Url always says Forbidden

Posted: 2010-02-04 11:47
by daemotron
Just change your Order allow,deny inside the <Directory> containers to Order deny,allow - and hopefully, you're done :wink:

Re: Url always says Forbidden

Posted: 2010-02-04 16:24
by msgbeep
question is: why does it goes well with the order in my friends directory and not in mine ?
Forbidden

You don't have permission to access /cromatic/gwsig/ on this server.
Apache/2.2.8 (Ubuntu) PHP/5.2.6-3ubuntu2 with Suhosin-Patch Server
is suhosin the problem ?

Re: Url always says Forbidden

Posted: 2010-02-04 18:31
by Joe User
Permissions probably set?

Re: Url always says Forbidden

Posted: 2010-02-04 20:40
by msgbeep
are u kidding ?
directories are set to rwx--x--x
files are set to rwxr-xr-x

You know what a symlink is.
/home/cromatic/public_html/test -> /home/friendshome/public_html/test
When I call the IP/friendshome/test i see my site
When I call the IP/cromatic/test the above error occur.

I do not understand why!

I have installed webmin on that system.
Could it be possible that webmin does any changes that do the trick by my friends home ?
Before webmin was installed, all gone fine with both accounts.

I will hand me webmins access to check webmins stuff for any kind of settings could be fail for me probably.

Re: Url always says Forbidden

Posted: 2010-02-04 20:47
by dotme
You are supstecting suhosin. Is there any difference requesting a php-script or a static file like something\.gif|css?
Are you running suexec?

Re: Url always says Forbidden

Posted: 2010-02-04 20:50
by Joe User
msgbeep wrote:are u kidding ?
not realy ;)
msgbeep wrote:directories are set to rwx--x--x
files are set to rwxr-xr-x
sure? the permissions for the directories are wrong. to repair them:

Code: Select all

cd /path/to/alias
find . -type d -print0 | xargs -0 chmod 0755
find . -type f -print0 | xargs -0 chmod 0644

Re: Url always says Forbidden

Posted: 2010-02-04 21:21
by msgbeep
does not solve the problem !

the issue why files need 755 is a security reason.
when they have 644 the same error occurs.

doenst fuond any differences or other kind of unnormal things under webin.

suexec isnt loaded!

Re: Url always says Forbidden

Posted: 2010-02-05 13:14
by msgbeep
\:D/ solved

was an UTF8 control char inside the Directory description of the vhost part.

thx anyways for your patient O:)

Re: Url always says Forbidden

Posted: 2010-02-05 13:48
by Joe User
nice! please write a bugreport for apache, thanks.