You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kevin Smith <th...@gmail.com> on 2013/12/02 16:37:23 UTC

[users@httpd] Stumped: Apache Permissions, What's Wrong?

I have been fighting an apache server for 2 days, trying to figure out why
this thing keeps denying access to the server. Check out the settings:

<VirtualHost 192.168.15.4:80>
DocumentRoot "/var/www/phreebooks"
ServerName billing.website.com (omitted for security)
<Directory "/var/www/phreebooks">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

File permissions throughout the entire directory of phreebooks, assigned
with the command

chown -R www-data:www-data phreebooks

drwxr-xr-x 8 www-data www-data     4096 2013-11-26 21:11 phreebooks
&
drwxr-xr-x  5 www-data www-data 4096 2013-11-26 21:57 install

As soon as I reinstalled the webserver, I got the "it works" index.html.

But when I try to run the install script at
billing.webserver.com/install/install.php, I get:

403: You don't have permission to access /install/install.php on this server.

I tried creating a test file, test.php, in the /var/www/phreebooks
directory. It allowed me to access the file, but when I move it into any
subdirectory, It gives the error, above, access denied.

I have tried completely stripping the apache server out, using apt-get
purge [apache packages]. Which everything was removed and then reinstalled.
It is having no effect. I've never had this problem with an apache server,
before. Please let me know if there are any more details you need...

Re: [users@httpd] Stumped: Apache Permissions, What's Wrong?

Posted by Eric Covener <co...@gmail.com>.
On Mon, Dec 2, 2013 at 2:46 PM, Kevin Smith
<th...@gmail.com> wrote:
> I modified it to look like this, but I've tried this, before to no effect
> and it still has no effect, now.
>
> <VirtualHost 192.168.15.4:80>
> DocumentRoot /var/www/phreebooks
> ServerName billing.website.com
> <Directory "/var/www/phreebooks">
> Order Allow,Deny
> Allow From All
> Require Allow All
> </Directory>
> </VirtualHost>
>

The access control syntax is wrong. Follow the example for your
default DocumentRoot.

It's quite possible you're not hitting this virtual host at all.
Putting a custom access log in there is a good way to tell, as is
lookin at apachectl -S.


> Log file /var/log/apache2/error.log
>
> [Mon Dec 02 13:30:11 2013] [notice] Apache/2.2.20 (Ubuntu)
> PHP/5.3.6-13ubuntu3.1 with Suhosin-Patch configured -- resuming normal
> operations
> [Mon Dec 02 13:30:15 2013] [error] [client 192.168.15.49] client denied by
> server configuration: /var/www/phreebooks/install/test.php

This means selinux and fileystem permissions are n/a.  See



> [Mon Dec 02 13:44:02 2013] [crit] [client 192.168.15.4] configuration error:
> couldn't perform authentication. AuthType not set!: /

probably due to the recent changes, better to make them look like the
<Directory> for your original/default DocumentRoot.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Stumped: Apache Permissions, What's Wrong?

Posted by Kevin Smith <th...@gmail.com>.
Here is my latest, revised config file and it works. Thanks for all the
help, everyone.

<VirtualHost 192.168.15.4:80>
DocumentRoot /var/www/phreebooks
   ServerName billing.website.com
   <Directory /var/www/phreebooks/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
   </Directory>
</VirtualHost>




On Mon, Dec 2, 2013 at 2:44 PM, Freek de Kruijf <f....@gmail.com>wrote:

> Op maandag 2 december 2013 13:46:12 schreef Kevin Smith:
> > I modified it to look like this, but I've tried this, before to no effect
> > and it still has no effect, now.
> >
> > <VirtualHost 192.168.15.4:80>
> > DocumentRoot /var/www/phreebooks
> > ServerName billing.website.com <http://billing.cajunpcrepair.com>
> > <Directory "/var/www/phreebooks">
> > Order Allow,Deny
> > Allow From All
> > Require Allow All
> > </Directory>
> > </VirtualHost>
> >
> > Log file /var/log/apache2/error.log
> >
> > [Mon Dec 02 13:30:11 2013] [notice] Apache/2.2.20 (Ubuntu)
>
> You are using apache 2.2 so Require Allow All should not be there; it is a
> new
> directive in 2.4.
>
> What URL did you use to access your website?
>
> --
> fr.gr.
>
> Freek de Kruijf
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Stumped: Apache Permissions, What's Wrong?

Posted by Freek de Kruijf <f....@gmail.com>.
Op maandag 2 december 2013 13:46:12 schreef Kevin Smith:
> I modified it to look like this, but I've tried this, before to no effect
> and it still has no effect, now.
> 
> <VirtualHost 192.168.15.4:80>
> DocumentRoot /var/www/phreebooks
> ServerName billing.website.com <http://billing.cajunpcrepair.com>
> <Directory "/var/www/phreebooks">
> Order Allow,Deny
> Allow From All
> Require Allow All
> </Directory>
> </VirtualHost>
> 
> Log file /var/log/apache2/error.log
> 
> [Mon Dec 02 13:30:11 2013] [notice] Apache/2.2.20 (Ubuntu)

You are using apache 2.2 so Require Allow All should not be there; it is a new 
directive in 2.4. 

What URL did you use to access your website?

-- 
fr.gr.

Freek de Kruijf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Stumped: Apache Permissions, What's Wrong?

Posted by Kevin Smith <th...@gmail.com>.
I modified it to look like this, but I've tried this, before to no effect
and it still has no effect, now.

<VirtualHost 192.168.15.4:80>
DocumentRoot /var/www/phreebooks
ServerName billing.website.com <http://billing.cajunpcrepair.com>
<Directory "/var/www/phreebooks">
Order Allow,Deny
Allow From All
Require Allow All
</Directory>
</VirtualHost>

Log file /var/log/apache2/error.log

[Mon Dec 02 13:30:11 2013] [notice] Apache/2.2.20 (Ubuntu)
PHP/5.3.6-13ubuntu3.1 with Suhosin-Patch configured -- resuming normal
operations
[Mon Dec 02 13:30:15 2013] [error] [client 192.168.15.49] client denied by
server configuration: /var/www/phreebooks/install/test.php

I also su'd into the www-data user, to make sure it had read/write
permissions on each file. It was able to create files, modify them and
delete them, if that helps.

I don't have SELinux installed.

When I try to access the website, from the local computer, using the
configuration above, this is what I get in error.log:

[Mon Dec 02 13:43:51 2013] [crit] [client 192.168.15.4] configuration
error:  couldn't perform authentication. AuthType not set!: /phreedom
[Mon Dec 02 13:43:52 2013] [crit] [client 192.168.15.4] configuration
error:  couldn't perform authentication. AuthType not set!: /favicon.ico
[Mon Dec 02 13:43:52 2013] [crit] [client 192.168.15.4] configuration
error:  couldn't perform authentication. AuthType not set!: /favicon.ico
[Mon Dec 02 13:44:02 2013] [crit] [client 192.168.15.4] configuration
error:  couldn't perform authentication. AuthType not set!: /



On Mon, Dec 2, 2013 at 11:17 AM, Eric Covener <co...@gmail.com> wrote:

> No mention of an error.log. That's step 1. The error may point you
> towards either Apache or OS/filesystem permissions (incl e.g.
> SELinux).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Stumped: Apache Permissions, What's Wrong?

Posted by Eric Covener <co...@gmail.com>.
No mention of an error.log. That's step 1. The error may point you
towards either Apache or OS/filesystem permissions (incl e.g.
SELinux).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Stumped: Apache Permissions, What's Wrong?

Posted by Darryle Steplight <ds...@gmail.com>.
Add "Order Allow, Deny" above "allow from all"

On Mon, Dec 2, 2013 at 11:23 AM, Freek de Kruijf <f....@gmail.com> wrote:
> Op maandag 2 december 2013 09:37:23 schreef Kevin Smith:
>> I have been fighting an apache server for 2 days, trying to figure out why
>> this thing keeps denying access to the server. Check out the settings:
>>
>> <VirtualHost 192.168.15.4:80>
>> DocumentRoot "/var/www/phreebooks"
>> ServerName billing.website.com (omitted for security)
>> <Directory "/var/www/phreebooks">
>
> The Order directive is missing or if you use apache 2.4 "Require allow all"
> and in the last case "allow from all" is gone.
>
>> allow from all
>> Options +Indexes
>> </Directory>
>> </VirtualHost>
>
>
> --
> fr.gr.
>
> Freek de Kruijf
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
----------------------------------------------
"May the source be with you."

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Stumped: Apache Permissions, What's Wrong?

Posted by Freek de Kruijf <f....@gmail.com>.
Op maandag 2 december 2013 09:37:23 schreef Kevin Smith:
> I have been fighting an apache server for 2 days, trying to figure out why
> this thing keeps denying access to the server. Check out the settings:
> 
> <VirtualHost 192.168.15.4:80>
> DocumentRoot "/var/www/phreebooks"
> ServerName billing.website.com (omitted for security)
> <Directory "/var/www/phreebooks">

The Order directive is missing or if you use apache 2.4 "Require allow all" 
and in the last case "allow from all" is gone.

> allow from all
> Options +Indexes
> </Directory>
> </VirtualHost>


-- 
fr.gr.

Freek de Kruijf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org