RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1702426 - ipa-server-common expected file permissions in package don't match runtime permissions
Summary: ipa-server-common expected file permissions in package don't match runtime pe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL:
Whiteboard:
: 1702430 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-23 18:29 UTC by Ryan Mullett
Modified: 2023-09-07 20:01 UTC (History)
9 users (show)

Fixed In Version: ipa-4.6.6-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:55:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-10344 0 None None None 2023-09-07 20:01:42 UTC
Red Hat Product Errata RHBA-2020:1083 0 None None None 2020-03-31 19:55:38 UTC

Description Ryan Mullett 2019-04-23 18:29:20 UTC
Description of problem:
File permissions from the rpm do not match the runtime permissions on several files. This results in mode failures on rpm -Va. Most noticed on systems in which DISA STIG is being performed and file permissions should not be less than the rpm provides or it is considered a finding during an audit. Important for government users and contractors who will be performing DISA STIG. 

Version-Release number of selected component (if applicable):
initscripts-9.49.46-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install and configure ipa server
2. rpm -V ipa-server-common

Actual results:
The following files have permissions that are more permissive than the rpm provides:

/var/lib/ipa/pki-ca/publish
/var/lib/kdcproxy
/var/named/dyndb-ldap/ipa

Expected results:
The file permissions provided via rpm should match the final runtime permissions (or they should be less restrictive on the rpm than the runtime permissions, which would not result in a finding).

Additional info:
The following output shows what it "should be" according to the rpm, as well as what it "actually is" after the package has been installed. This could be resolved by using the proper permissions in the spec file, so that rpm -Va will not flag on these files.

From rpm: ipa-server-common-4.6.4-10.el7_6.3.noarch
/var/lib/ipa/pki-ca/publish
SHOULD BE:  000
ACTUALLY IS:  775
--
From rpm: ipa-server-common-4.6.4-10.el7_6.3.noarch
/var/lib/kdcproxy
SHOULD BE:  000
ACTUALLY IS:  700
--
From rpm: ipa-server-common-4.6.4-10.el7_6.3.noarch
/var/named/dyndb-ldap/ipa
SHOULD BE:  000
ACTUALLY IS:  770

Comment 3 Rob Crittenden 2019-04-23 18:40:19 UTC
These are all %ghost directories and are appearing now due to a change in rpm, https://bugzilla.redhat.com/show_bug.cgi?id=1406611

Comment 4 Rob Crittenden 2019-04-23 18:41:12 UTC
*** Bug 1702430 has been marked as a duplicate of this bug. ***

Comment 5 Rob Crittenden 2019-04-23 18:42:13 UTC
Additional ghosted files:

From rpm: ipa-client-common-4.6.4-10.el7_6.3.noarch
/etc/ipa/nssdb/cert8.db
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: ipa-client-common-4.6.4-10.el7_6.3.noarch
/etc/ipa/nssdb/key3.db
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: ipa-client-common-4.6.4-10.el7_6.3.noarch
/etc/ipa/nssdb/pwdfile.txt
SHOULD BE:  000
ACTUALLY IS:  600
--
From rpm: ipa-client-common-4.6.4-10.el7_6.3.noarch
/etc/ipa/nssdb/secmod.db
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: ipa-client-common-4.6.4-10.el7_6.3.noarch
/etc/pki/ca-trust/source/ipa.p11-kit
SHOULD BE:  000
ACTUALLY IS:  600

Comment 6 Florence Blanc-Renaud 2019-05-03 14:39:56 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7934

Comment 11 Kaleem 2019-11-07 09:33:18 UTC
Verified using upstream tests test_installation.py::TestInstallMaster::test_file_permissions

Snip from output of executed logs.
======================================

 'tls_ca_cert': u'/root/.ipa/ca.crt',
 'tls_version_max': u'tls1.2',
 'tls_version_min': u'tls1.2',
 'validate_api': False,
 'verbose': 0,
 'version': u'4.6.6',  ***** IPA VERSION *****
 'wait_for_dns': 0,
 'webui_prod': True}
uname: ('Linux', 'runner.testrelm.test', '3.10.0-1109.el7.x86_64', '#1 SMP Sat Nov 2 11:57:33 EDT 2019', 'x86_64')
euid: 0, egid: 0
working dir: /usr/lib/python2.7/site-packages/ipatests
sys.version: 2.7.5 (default, Sep 26 2019, 13:23:47) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
[1m============================= test session starts ==============================[0m
platform linux2 -- Python 2.7.5, pytest-4.6.6, py-1.8.0, pluggy-0.13.0 -- /usr/bin/python2
cachedir: .pytest_cache
metadata: {'Python': '2.7.5', 'Platform': 'Linux-3.10.0-1109.el7.x86_64-x86_64-with-redhat-7.8-Maipo', 'Packages': {'py': '1.8.0', 'pytest': '4.6.6', 'pluggy': '0.13.0'}, 'Plugins': {u'html': u'1.22.0', u'multihost': u'1.1', u'sourceorder': u'0.5', u'metadata': u'1.8.0'}}
rootdir: /usr/lib/python2.7/site-packages/ipatests
plugins: metadata-1.8.0, html-1.22.0, multihost-1.1, sourceorder-0.5
[1mcollecting ... [0mcollected 7 items

test_integration/test_installation.py::TestInstallMaster::test_install_master [32mPASSED[0m[36m [ 14%][0m
test_integration/test_installation.py::TestInstallMaster::test_install_kra [32mPASSED[0m[36m [ 28%][0m
test_integration/test_installation.py::TestInstallMaster::test_install_dns [32mPASSED[0m[36m [ 42%][0m
test_integration/test_installation.py::TestInstallMaster::test_ipactl_restart_pki_tomcat [32mPASSED[0m[36m [ 57%][0m
test_integration/test_installation.py::TestInstallMaster::test_WSGI_worker_process [32mPASSED[0m[36m [ 71%][0m
test_integration/test_installation.py::TestInstallMaster::test_error_for_yubikey [32mPASSED[0m[36m [ 85%][0m
test_integration/test_installation.py::TestInstallMaster::test_file_permissions [32mPASSED[0m[36m [100%][0m   ***** APPLICABLE TEST FOR THIS BZ *****

Comment 14 errata-xmlrpc 2020-03-31 19:55:19 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, 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/RHBA-2020:1083


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