Url always says Forbidden

Apache, Lighttpd, nginx, Cherokee
msgbeep
Posts: 62
Joined: 2002-10-08 11:27

Url always says Forbidden

Post by msgbeep » 2010-02-03 15:21

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. ](*,)

User avatar
daemotron
Administrator
Administrator
Posts: 2635
Joined: 2004-01-21 17:44

Re: Url always says Forbidden

Post by daemotron » 2010-02-04 11:47

Just change your Order allow,deny inside the <Directory> containers to Order deny,allow - and hopefully, you're done :wink:
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time

msgbeep
Posts: 62
Joined: 2002-10-08 11:27

Re: Url always says Forbidden

Post by msgbeep » 2010-02-04 16:24

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 ?
Last edited by msgbeep on 2010-02-04 16:40, edited 2 times in total.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Url always says Forbidden

Post by Joe User » 2010-02-04 18:31

Permissions probably set?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

msgbeep
Posts: 62
Joined: 2002-10-08 11:27

Re: Url always says Forbidden

Post by msgbeep » 2010-02-04 20:40

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.

dotme
Posts: 150
Joined: 2004-12-15 16:48

Re: Url always says Forbidden

Post by dotme » 2010-02-04 20:47

You are supstecting suhosin. Is there any difference requesting a php-script or a static file like something\.gif|css?
Are you running suexec?

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Url always says Forbidden

Post by Joe User » 2010-02-04 20:50

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
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

msgbeep
Posts: 62
Joined: 2002-10-08 11:27

Re: Url always says Forbidden

Post by msgbeep » 2010-02-04 21:21

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!
Last edited by msgbeep on 2010-02-04 23:27, edited 3 times in total.

msgbeep
Posts: 62
Joined: 2002-10-08 11:27

Re: Url always says Forbidden

Post by msgbeep » 2010-02-05 13:14

\:D/ solved

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

thx anyways for your patient O:)

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Url always says Forbidden

Post by Joe User » 2010-02-05 13:48

nice! please write a bugreport for apache, thanks.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.