Bug 1860519 - Browsing capsule /pub directory with https fails with forbidden don't have permission to access /pub/ error.
Summary: Browsing capsule /pub directory with https fails with forbidden don't have pe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installer
Version: 6.8.0
Hardware: All
OS: Linux
medium
medium vote
Target Milestone: 6.8.0
Assignee: Eric Helms
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-24 21:09 UTC by dgupte
Modified: 2021-09-06 05:32 UTC (History)
2 users (show)

Fixed In Version: foreman-installer-2.1.2.3-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 13:04:32 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30716 0 Normal Closed Browsing capsule /pub directory with https fails with forbidden don't have permission to access /pub/ error. 2020-11-12 21:07:01 UTC
Red Hat Knowledge Base (Solution) 5296621 0 None None None 2020-08-05 06:48:08 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:04:49 UTC

Description dgupte 2020-07-24 21:09:09 UTC
Description of problem:
>> 
After upgrade from Red Hat Satellite 6.6 to 6.7, browsing capsule.example.com/pub directory fails with Forbidden errors. 

You don't have permission to access /pub/ on this server

- /var/log/httpd/pulp-https_error_ssl.log

[autoindex:error] [pid 34896] [client 10.10.49.10:46870] AH01276: Cannot serve directory /var/www/html/pub/: No matching DirectoryIndex (index.html,index.html.var,index.cgi,index.pl,index.php,index.xhtml) found, and server-generated directory index forbidden by Options directive

Version-Release number of selected component (if applicable):
>>>
6.7
6.8-beta

How reproducible:
>>>
1) Browse https://capsule.example.com/pub --> It does not work
2) Browsing http://capsule.example.com/pub --> It works

Actual results:
>>>
Forbidden
You don't have permission to access /pub/ on this server

Additional Info:-
>>> Issue started after upgrade from 6.6 to 6.7 only. 

Workaround :  # sed -i -e 's/ Options/Options +FollowSymLinks +Indexes/g' /etc/httpd/conf.d/05-pulp-https.conf

- Installer overwrites Options directives, 
 
[ WARN 2020-07-25T00:10:22 main]  /Stage[main]/Pulp::Apache/Apache::Vhost[pulp-https]/Concat[05-pulp-https.conf]/File[/etc/httpd/conf.d/05-pulp-https.conf]/content: 
[ WARN 2020-07-25T00:10:22 main] --- /etc/httpd/conf.d/05-pulp-https.conf       2020-07-24 21:29:40.458852002 +0530
[ WARN 2020-07-25T00:10:22 main] +++ /tmp/puppet-file20200725-6707-190w1gd      2020-07-25 00:10:22.083480630 +0530
[ WARN 2020-07-25T00:10:22 main] @@ -19,7 +19,7 @@
[ WARN 2020-07-25T00:10:22 main]    <IfModule mod_passenger.c>
[ WARN 2020-07-25T00:10:22 main]      PassengerEnabled off
[ WARN 2020-07-25T00:10:22 main]    </IfModule>
[ WARN 2020-07-25T00:10:22 main] - Options +FollowSymLinks +Indexes 
[ WARN 2020-07-25T00:10:22 main] +  Options 
[ WARN 2020-07-25T00:10:22 main]    Require all granted

Comment 1 Ewoud Kohl van Wijngaarden 2020-08-10 15:34:39 UTC
I'm confused: the message mentions 6.6 -> 6.7 but the version is set to 6.8.0?

Either way, this looks to be introduced by https://github.com/theforeman/puppet-foreman_proxy_content/commit/f6790c4a940267602450e7d9284f2f2b6d5a92db. The template is used in pub_dir.pp (for the Satellite) and init.pp (for the Capsule). In the former the pub_dir_options variable is set, but in the latter it isn't.

Comment 2 dgupte 2020-08-11 02:21:32 UTC
Hi, 
Issue is reproducible on 6.8-beta as well so set higher version instead.

Comment 3 Eric Helms 2020-08-26 18:47:49 UTC
Created redmine issue https://projects.theforeman.org/issues/30716 from this bug

Comment 4 Bryan Kearney 2020-08-26 20:06:15 UTC
Upstream bug assigned to ehelms@redhat.com

Comment 5 Bryan Kearney 2020-08-26 20:06:17 UTC
Upstream bug assigned to ehelms@redhat.com

Comment 6 Bryan Kearney 2020-08-27 16:06:30 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30716 has been resolved.

Comment 8 Devendra Singh 2020-09-09 16:26:38 UTC
Verified on 6.8 Snap14

Verification points.

1- /pub accessible from capsule via https 

attachd https.png

2. /pub accessible from capsule via http

attached http.png

3. Verfied the foreman-installer version

# rpm -qa|grep foreman-installer
foreman-installer-2.1.2.4-1.el7sat.noarch

Comment 13 errata-xmlrpc 2020-10-27 13:04:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366


Note You need to log in before you can comment on or make changes to this bug.