Forum

Constant 403 errors

Thom
3 June 2009, 22:42
I'm constantly getting 403 errors via Hiawatha. I've got a slightly different Debian setup (with /home/<first letter>/<user name>), defined via /etc/adduser.conf

The log file returns this:
Wed 03 Jun 2009 21:34:01 +0100|92.236.218.178|/home/x/xyz/domains/xyz.com/banshee/public/index.php|access denied via filesystem


I've added www-data to users (/home/* it chgrp'd to users with 755 permissions and /home/*/* to username:username* (*user group with same name) with o-rx permissions).

Any ideas how to get around this?

Hiawatha version: 6.14
Operating System: Debian Lenny
Hugo Leisink
4 June 2009, 02:56
The best thing to do is to switch to user www-data, chdir to the specific directory and try to cat the file you want to request via Hiawatha. It will point out where it goes wrong.
Thom
4 June 2009, 17:18
Odd... I was able to cat index.php just fine that way... Yet via browser I get the 403 error and the above error in the log.
Hugo Leisink
4 June 2009, 23:09
Can you show me your configuration file? Anything special about your server besides the home directories?
Mario Z.
16 October 2009, 00:28
Hi,

Sorry for this question, maybe its just ignorance on my side.
I am new to linux so this may be (a big) part of the problem.

I installed Hyawatha 6.16 on Xubuntu 9.04, following the excellent directions given by Samiux.
Could compile and install without problems.

I changed the WebsiteRoot = /var/www/analyte/public and I can access my own index.html file (http://soporte.analyte.com/index.html) from the browser without problems, so I know Hyawatha is up and running.

I also configured PHP, created a small info.php file and put it in the /var/www/analyte/public directory where the index.html file is.

Th problem is when I try to get the info.php file from the browser (http://soporte.analyte.com/info.php) I get a (BIG) 403 Forbidden error. I tried to change the permissions on the analyte/public directory and on the file but nothing changed.

After reading post "CONSTANT 403 ERRORS" in the forum I tested with the www-data user as you suggested.
Following are the results:

>>>>
$su - www-data

$cd /var/www/analyte/public

$ ls -l
total 8
-rwxrwxrwx 1 root root 78 2009-10-15 15:03 index.html
-rwxrwxrwx 1 root root 43 2009-10-15 17:35 info.php

$ /usr/bin/php5-cgi -v
PHP 5.2.6-3ubuntu4.2 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: Aug 21 2009 19:06:32)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

$ /usr/bin/php5-cgi info.php
X-Powered-By: PHP/5.2.6-3ubuntu4.2
Content-type: text/html
PHP esta corriendo aqui !$
>>>

And the script is executed without problems !
I know this must be a permissions problem but cannot figure out.

Thanks for any help you can provide.
And congratulations for this excellent piece of software.

Mario
Hugo Leisink
16 October 2009, 01:18
Did you add 'ExecuteCGI = yes' to the host configuration?
Mario Z.
16 October 2009, 19:46
Hugo,
Thanks for your prompt answer.

Just to be sure I built everything again using the 6.17.1 files.
I reinstalled the pckg and restarted with the minimum conf files , adding ExecuteCGI=yes as you suggested.
I have the UseFastCGI line comented.

And It worked ! So at least I have PHP working with CGI.

I will now try to use FastCGI.
For that purpose I understand I have to comment the ExecuteCGI line and uncomment the UseFastCGI line (and configure the FastCGI section of course).
Is this right ?

When I finish all the setup I will write small briefing on how we are using Hiawatha :-)

Thanks again.
Mario
Mario Z.
16 October 2009, 19:54
By the way:
Not a problem, but just to let you know in case there is a problem with the pckg installer in Ubuntu/Debian.
I am using Ubuntu 9.04.
When I reinstalled the pckg the conf files were not copied to the /etc/hiawatha dir.
I tried a couple of times, but were not copied.
I have to copy them by hand.

Best regards
Mario
Hugo Leisink
16 October 2009, 20:07
How to configure CGI and FastCGI, just read the HOWTO. It's all there.
Mario Z.
16 October 2009, 22:31
Just to let you know you have another Hiawatha happy user !
Everything worked fine with FastCGI, I have everything running ok.
I hope to begin some load and performance tests in a couple of weeks.
I will keep you informed.
Best regards and thanks for your help.
Mario
This topic has been closed.