Bug 1182319

Summary: Wrong permission of /var/account/pacct in psacct package
Product: Red Hat Enterprise Linux 7 Reporter: Paulo Andrade <pandrade>
Component: psacctAssignee: Jan Rybar <jrybar>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.2CC: bnater
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-07 12:11:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1182317, 1249665    
Bug Blocks:    

Description Paulo Andrade 2015-01-14 20:35:11 UTC
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

Comment 3 Jaromír Cápík 2016-01-14 16:04:53 UTC
The right solution is to fix the permissions in the cpio to 0600:


diff --git a/psacct.spec b/psacct.spec
index 49fef5c..2543d0d 100644
--- a/psacct.spec
+++ b/psacct.spec
@@ -85,7 +85,7 @@ cp dump-acct.8 %{buildroot}%{_mandir}/man8/
 rm -f %{buildroot}%{_infodir}/dir
 
 mkdir -p %{buildroot}/var/account
-touch %{buildroot}/var/account/pacct
+touch %{buildroot}/var/account/pacct && chmod 0600 %{buildroot}/var/account/pacct
 
 # create logrotate config file
 mkdir -p %{buildroot}/etc/logrotate.d

Comment 6 Lukáš Nykrýn 2016-06-07 12:11:04 UTC

*** This bug has been marked as a duplicate of bug 1249665 ***