You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by James Moe <ji...@sohnen-moe.com.INVALID> on 2018/07/16 21:53:05 UTC
[users@httpd] "Permissions" lost after upgrade to 2.4.33
Hello,
opensuse LEAP 15
linux 4.12.14-lp150.11-default x86_64
apache2 2.4.33
After the upgrade from v2.4.23 to v2.4.33, https requests yield error
403:
Access forbidden!
You don't have permission to access the requested directory. There is
either no index document or the directory is read-protected.
Neither of the stated reasons are true. The OS permissions for the
directory are 775; there is an <index.php>.
So, the "permissions" are an apache thing, not OS?
http requests yield eroor 400:
Bad request!
Your browser (or proxy) sent a request that this server could not
understand.
This was obviously not a problem in v2.4.23. I do not see what is
different.
apachectl -t proclained "Syntax OK."
Suggestions?
----[ from the error log ]----
[Mon Jul 16 14:45:30.020764 2018] [access_compat:error] [pid 26589]
[client 192.168.69.115:48200] AH01797: client denied by server
configuration: /data01/t-drv/websites/sma-v3/
----[ vhost config ]----
<VirtualHost *:80>
ServerAdmin jimoe@sohnen-moe.com
ServerName sma-v3.sma.com
DocumentRoot "/data01/t-drv/websites/sma-v3"
ErrorDocument 404 /404.php
ErrorDocument 410 /410.php
ErrorDocument 401 /401.php
ErrorLog "/data01/t-drv/websites/.logs/sma-v3-error_log"
CustomLog "/data01/t-drv/websites/.logs/sma-v3-access_log" common
<Directory "/data01/t-drv/websites/sma-v3">
AllowOverride FileInfo Authconfig Options
Options Indexes FollowSymLinks MultiViews
AddHandler application/x-httpd-php .php
MultiviewsMatch Handlers
Require all granted
</Directory>
<Files *>
Forcetype application/x-http-php
</Files>
<Files *\.*>
Forcetype none
</Files>
</VirtualHost>
##
## SSL Virtual Host Context
##
<IfDefine SSL>
#
# Some MIME-types for downloading Certificates and CRLs
#
# AddType application/x-x509-ca-cert .crt
# AddType application/x-pkcs7-crl .crl
<IfModule mod_ssl.c>
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "/data01/t-drv/websites/sma-v3"
ServerName sma-v3.sma.com
ServerAdmin jimoe@sohnen-moe.com
ErrorLog "/data01/t-drv/websites/.logs/sma-v3s-error_log"
CustomLog "/data01/t-drv/websites/.logs/sma-v3s-access_log" common
TransferLog "/data01/t-drv/websites/.logs/access_log"
ErrorDocument 404 /404.php
ErrorDocument 410 /410.php
ErrorDocument 401 /401.php
<Directory "/data01/t-drv/websites/sma-v3">
AllowOverride Authconfig
AllowOverride All
Options -ExecCGI
Require all granted
</Directory>
SSLEngine on
# SSLCertificateFile
"/data01/t-drv/websites/.conf/ssl/sma-ca-2/sma-multi.crt"
# SSLCertificateKeyFile
"/data01/t-drv/websites/.conf/ssl/sma-ca-2/sma-multi.key"
SSLCertificateChainFile "/data01/srv/vhosts.sma/ssl/sma-ca-chain.cert.pem"
SSLCertificateFile "/data01/srv/vhosts.sma/ssl/www.sma.com.cert-01.pem"
SSLCertificateKeyFile
"/data01/srv/vhosts.sma/ssl/www.sma.com.insecure-01.key"
# SSLCipherSuite HIGH:!SSLv2:!ADH:!aNULL:!eNULL:!NULL
SSLProtocol ALL -SSLv2
</VirtualHost>
</ifmodule>
</ifdefine>
----[ end ]----
--
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.
Re: [users@httpd] "Permissions" lost after upgrade to 2.4.33
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Mon, Jul 16, 2018 at 4:53 PM, James Moe <ji...@sohnen-moe.com.invalid>
wrote:
>
> After the upgrade from v2.4.23 to v2.4.33, https requests yield error
> 403:
> Access forbidden!
> You don't have permission to access the requested directory. There is
> either no index document or the directory is read-protected.
>
Likely answered elsewhere.
> http requests yield eroor 400:
> Bad request!
> Your browser (or proxy) sent a request that this server could not
> understand.
>
That is straightforward, your *client*, not httpd, has been sending bad
requests. Those might have CR or LF line endings, but failed to send
both CR+LF as required by the spec. It might be sending a badly
formatted request line, or invalid request header lines. LogLevel debug
here would be your friend, or you can use wireshark to look at a request.
'HttpProtocolOptions unsafe' config option can allow some of this very
unwise traffic to pass, but fixing the client is the correct solution.
Re: [users@httpd] "Permissions" lost after upgrade to 2.4.33
Posted by Eric Covener <co...@gmail.com>.
I'd drop the IfModules and IfDefines and see how that changes your observations.
On Mon, Jul 16, 2018 at 5:53 PM James Moe <ji...@sohnen-moe.com.invalid> wrote:
>
> Hello,
> opensuse LEAP 15
> linux 4.12.14-lp150.11-default x86_64
> apache2 2.4.33
>
> After the upgrade from v2.4.23 to v2.4.33, https requests yield error
> 403:
> Access forbidden!
> You don't have permission to access the requested directory. There is
> either no index document or the directory is read-protected.
>
> Neither of the stated reasons are true. The OS permissions for the
> directory are 775; there is an <index.php>.
> So, the "permissions" are an apache thing, not OS?
>
> http requests yield eroor 400:
> Bad request!
> Your browser (or proxy) sent a request that this server could not
> understand.
>
> This was obviously not a problem in v2.4.23. I do not see what is
> different.
> apachectl -t proclained "Syntax OK."
>
> Suggestions?
>
> ----[ from the error log ]----
> [Mon Jul 16 14:45:30.020764 2018] [access_compat:error] [pid 26589]
> [client 192.168.69.115:48200] AH01797: client denied by server
> configuration: /data01/t-drv/websites/sma-v3/
>
>
> ----[ vhost config ]----
> <VirtualHost *:80>
> ServerAdmin jimoe@sohnen-moe.com
>
> ServerName sma-v3.sma.com
> DocumentRoot "/data01/t-drv/websites/sma-v3"
> ErrorDocument 404 /404.php
> ErrorDocument 410 /410.php
> ErrorDocument 401 /401.php
>
> ErrorLog "/data01/t-drv/websites/.logs/sma-v3-error_log"
> CustomLog "/data01/t-drv/websites/.logs/sma-v3-access_log" common
>
> <Directory "/data01/t-drv/websites/sma-v3">
> AllowOverride FileInfo Authconfig Options
> Options Indexes FollowSymLinks MultiViews
>
> AddHandler application/x-httpd-php .php
> MultiviewsMatch Handlers
>
> Require all granted
> </Directory>
> <Files *>
> Forcetype application/x-http-php
> </Files>
> <Files *\.*>
> Forcetype none
> </Files>
>
> </VirtualHost>
>
> ##
> ## SSL Virtual Host Context
> ##
> <IfDefine SSL>
> #
> # Some MIME-types for downloading Certificates and CRLs
> #
> # AddType application/x-x509-ca-cert .crt
> # AddType application/x-pkcs7-crl .crl
>
> <IfModule mod_ssl.c>
> <VirtualHost *:443>
>
> # General setup for the virtual host
> DocumentRoot "/data01/t-drv/websites/sma-v3"
> ServerName sma-v3.sma.com
> ServerAdmin jimoe@sohnen-moe.com
> ErrorLog "/data01/t-drv/websites/.logs/sma-v3s-error_log"
> CustomLog "/data01/t-drv/websites/.logs/sma-v3s-access_log" common
> TransferLog "/data01/t-drv/websites/.logs/access_log"
>
> ErrorDocument 404 /404.php
> ErrorDocument 410 /410.php
> ErrorDocument 401 /401.php
>
> <Directory "/data01/t-drv/websites/sma-v3">
> AllowOverride Authconfig
> AllowOverride All
> Options -ExecCGI
> Require all granted
> </Directory>
>
> SSLEngine on
>
> # SSLCertificateFile
> "/data01/t-drv/websites/.conf/ssl/sma-ca-2/sma-multi.crt"
> # SSLCertificateKeyFile
> "/data01/t-drv/websites/.conf/ssl/sma-ca-2/sma-multi.key"
>
> SSLCertificateChainFile "/data01/srv/vhosts.sma/ssl/sma-ca-chain.cert.pem"
> SSLCertificateFile "/data01/srv/vhosts.sma/ssl/www.sma.com.cert-01.pem"
> SSLCertificateKeyFile
> "/data01/srv/vhosts.sma/ssl/www.sma.com.insecure-01.key"
>
> # SSLCipherSuite HIGH:!SSLv2:!ADH:!aNULL:!eNULL:!NULL
> SSLProtocol ALL -SSLv2
>
> </VirtualHost>
> </ifmodule>
> </ifdefine>
> ----[ end ]----
>
>
>
> --
> James Moe
> moe dot james at sohnen-moe dot com
> 520.743.3936
> Think.
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: [SOLVED] "Permissions" lost after upgrade to 2.4.33
Posted by James Moe <ji...@sohnen-moe.com.INVALID>.
On 07/16/2018 02:53 PM, James Moe wrote:
> After the upgrade from v2.4.23 to v2.4.33, https requests yield error
> 403:
> Access forbidden!
> You don't have permission to access the requested directory. There is
> either no index document or the directory is read-protected.
>
I expunges all traces of apache2 from the system: the programs, config
files, everything I could find. Then performed a clean install.
I copied the necessary configuration bits from backup. Apache2 started
providing useful messages in the error logs. After cleaning up the vhost
files, the local websites now load properly.
As a final note, I suspect having "access_compat" in the LoadModules
list was a Bad Thing.
--
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.
[users@httpd] "Permissions" lost after upgrade to 2.4.33
Posted by James Moe <ji...@sohnen-moe.com.INVALID>.
On 07/16/2018 02:53 PM, James Moe wrote:
> After the upgrade from v2.4.23 to v2.4.33, https requests yield error
> 403: Access forbidden!
> http requests return: error 400 Bad request!
>
I have read the docs. I have added what seemed like the correct
directive for allowing access. Still no access allowed.
What is incorrect with this vhost?
<VirtualHost *:80>
ServerAdmin jimoe@sohnen-moe.com
ServerName sma-v3.sma.com
DocumentRoot "/data01/t-drv/websites/sma-v3"
ErrorDocument 404 /404.php
ErrorDocument 410 /410.php
ErrorDocument 401 /401.php
ErrorLog "/data01/t-drv/websites/.logs/sma-v3-error_log"
CustomLog "/data01/t-drv/websites/.logs/sma-v3-access_log" common
<Directory "/data01/t-drv/websites/sma-v3">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<IfDefine SSL>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "/data01/t-drv/websites/sma-v3"
ServerName sma-v3.sma.com
ServerAdmin jimoe@sohnen-moe.com
ErrorLog "/data01/t-drv/websites/.logs/sma-v3s-error_log"
CustomLog "/data01/t-drv/websites/.logs/sma-v3s-access_log" common
TransferLog "/data01/t-drv/websites/.logs/access_log"
ErrorDocument 404 /404.php
ErrorDocument 410 /410.php
ErrorDocument 401 /401.php
<Directory "/data01/t-drv/websites/sma-v3">
AllowOverride All
Options -ExecCGI
Options Indexes FollowSymLinks
Require all granted
</Directory>
SSLEngine on
SSLCertificateChainFile "/data01/srv/vhosts.sma/ssl/sma-ca-chain.cert.pem"
SSLCertificateFile "/data01/srv/vhosts.sma/ssl/www.sma.com.cert-01.pem"
SSLCertificateKeyFile
"/data01/srv/vhosts.sma/ssl/www.sma.com.insecure-01.key"
# SSLCipherSuite HIGH:!SSLv2:!ADH:!aNULL:!eNULL:!NULL
SSLProtocol ALL -SSLv2
</VirtualHost>
</ifmodule>
</ifdefine>
--
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.
Re: [users@httpd] Re: "Permissions" lost after upgrade to 2.4.33
Posted by Eric Covener <co...@gmail.com>.
[Mon Jul 16 14:45:30.020764 2018] [access_compat:error] [pid 26589]
[client 192.168.69.115:48200] AH01797: client denied by server
configuration: /data01/t-drv/websites/sma-v3/
Means it's not filesystem permissions, but Require / allow / deny.
On Mon, Jul 16, 2018 at 7:42 PM James Moe <ji...@sohnen-moe.com.invalid> wrote:
>
> On 07/16/2018 02:53 PM, James Moe wrote:
>
> > So, the "permissions" are an apache thing, not OS?
> >
> These are the OS directory permissions to the Doc Root
> /data01/t-drv/websites/sma-v3/:
> drwxrwxr-x 1 root users 104 Feb 25 16:14 data01/
> drwxrwxr-x 1 sma-user3x users 140 Jul 16 01:02 t-drv/
> drwxrwxr-x 1 sma-user3x users 1256 Apr 20 12:32 websites/
> drwxrwxr-x 1 sma-user3x users 1350 May 21 15:56 sma-v3/
>
> --
> James Moe
> moe dot james at sohnen-moe dot com
> 520.743.3936
> Think.
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: "Permissions" lost after upgrade to 2.4.33
Posted by James Moe <ji...@sohnen-moe.com.INVALID>.
On 07/16/2018 02:53 PM, James Moe wrote:
> So, the "permissions" are an apache thing, not OS?
>
These are the OS directory permissions to the Doc Root
/data01/t-drv/websites/sma-v3/:
drwxrwxr-x 1 root users 104 Feb 25 16:14 data01/
drwxrwxr-x 1 sma-user3x users 140 Jul 16 01:02 t-drv/
drwxrwxr-x 1 sma-user3x users 1256 Apr 20 12:32 websites/
drwxrwxr-x 1 sma-user3x users 1350 May 21 15:56 sma-v3/
--
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.