Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
RPM verification no longer reports failures in the `/var/account/pacct` file
Previously, the RPM verification and compliance check reported failures, because the mode of the `/var/account/pacct` file was not set after installation. To fix this bug, the mode of `/var/account/pacct` is changed immediately after installation to 0600. As a result, the RPM verification check no longer reports failures in the `/var/account/pacct`, and the file is now accessible only by root.
RPM psacct specifies the file /var/account/pacct as a ghost file with permissions 640, but after installation the file has permission 644, causing rpm verficiation and subsequent compliance check failures.
A simple psacct.spec pseudo patch would be:
-%attr(0600,root,root) %ghost %config %{accounting_logdir}/pacct
+%attr(0644,root,root) %ghost %config %{accounting_logdir}/pacct
Hello Paulo.
I just tested that on RHEL5 and RHEL6 and the file permissions are 0600 in both cases (and that's correct). I probably don't understand what you're trying to say/achieve. Could you please be more verbose?
Thanks,
Jaromir.
Hi Jaromír,
This bug report is a kind of a sibling of
https://bugzilla.redhat.com/show_bug.cgi?id=1182304
I personally do not have an "atop" package, but I see,
on rhel-7:
$ LC_ALL=C ls /var/account/pacct -la
-rw-r--r--. 1 root root 0 Dec 9 10:37 /var/account/pacct
The thing is, that the logrotate file is marked as %config(noreplace) and for some reason you might have an old/wrong version of that file and it doesn't get replaced with the latest one.
Summary
========
The file permissions in the CPIO archive are really 644 since the ghost entries do not fix file permissions. Therefore the following spec lines need to be equipped with a permission modification:
mkdir -p %{buildroot}/var/account
touch %{buildroot}/var/account/pacct
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://rhn.redhat.com/errata/RHBA-2017-0770.html
RPM psacct specifies the file /var/account/pacct as a ghost file with permissions 640, but after installation the file has permission 644, causing rpm verficiation and subsequent compliance check failures. A simple psacct.spec pseudo patch would be: -%attr(0600,root,root) %ghost %config %{accounting_logdir}/pacct +%attr(0644,root,root) %ghost %config %{accounting_logdir}/pacct