Bug #37130
closedInstaller doesn't set correct permissions of /pub/ files
Description
Installer doesn't set correct permissions of /pub/ files
When running the installer on a fresh system, some of the contents of the /pub directory are not accessible. Trying to download the consumer RPM from "https://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm" results in a "403 Forbidden" error. From looking at the file on the system, it seems like the installer is not setting to correct permissions on the files it generated. There isn't read access for the "apache" user:
- ll
a /var/www/html/pub. 1 root root 74211 Apr 26 2022 bootstrap.py
total 120
drwxr-xr-x. 2 apache apache 4096 Dec 6 01:37 .
drwxr-xr-x. 3 root root 82 Dec 5 01:28 ..
-rw-r--r-rw------. 1 root root 12056 Nov 30 17:40 katello-ca-consumer-satellite.example.com-1.0-1.noarch.rpmrw------. 1 root root 11312 Nov 30 17:40 katello-ca-consumer-satellite.example.com-1.0-1.src.rpm
lrwxrwxrwx. 1 root root 94 Nov 30 17:40 katello-ca-consumer-latest.noarch.rpm> /var/www/html/pub/katello-ca-consumer-satellite.example.com-1.0-1.noarch.rpm. 1 root root 8240 Nov 30 17:40 katello-rhsm-consumer
-rwx-----rw-r--r-. 1 root root 2706 Nov 30 17:40 katello-server-ca.crt
It seems to be using the default umask for the system:
- umask
0077
This can be fixed by adding global read access to the files, but it seems like the installer should be doing this.
Reproducible: Always
Steps to Reproduce:
1. Start with a fresh system
2. Have the umask set to 0077
3. Run `satellite-installer --scenario satellite`
4. Try to access "https://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm"
Actual Results:
"403 Forbidden" error
Expected Results:
RPM file is downloaded
Updated by The Foreman Bot 8 months ago
- Status changed from New to Ready For Testing
- Assignee set to Eric Helms
- Pull request https://github.com/theforeman/puppet-foreman_proxy_content/pull/471 added
Updated by Eric Helms 8 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset puppet-foreman_proxy_content|6500b09d4b18a798d770d5e5ff88b629dc2c9e2a.
Updated by The Foreman Bot 7 months ago
- Pull request https://github.com/theforeman/puppet-foreman_proxy_content/pull/472 added
Updated by The Foreman Bot 7 months ago
- Pull request https://github.com/theforeman/puppet-foreman_proxy_content/pull/477 added