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.

Bug 1149374

Summary: wrong "/" permissions (should be 555)
Product: Red Hat Enterprise Linux 7 Reporter: Karel Volný <kvolny>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: jmarko, jscotka, kvolny, lnykryn, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: initscripts-9.49.20-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1066591 Environment:
Last Closed: 2015-03-05 10:53:36 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: 1066591    
Bug Blocks:    

Comment 2 Ondrej Vasik 2014-10-04 07:26:48 UTC
Most likely not an issue with filesystem package itself. Not sure how to properly debug this issue in beaker - I expect you are not able to reproduce it in clean, virtual machine installation. You can possibly use inotify on "/", tracking where the root directory changes. Still, without "out of beaker", I would suggest to reassign this to beaker - as their environment likely modifies the root directory somehow.

Comment 3 Ondrej Vasik 2014-10-07 10:03:42 UTC
Adding lnykryn to cc - as https://bugzilla.redhat.com/show_bug.cgi?id=1030691 seems to be possible duplicate of this issue. Lukas, what do you think? Symptoms are the same...

Comment 4 Lukáš Nykrýn 2014-10-07 10:11:50 UTC
Yep it looks similar, if you have some reproducer, I can provide a test package.

Comment 5 Ondrej Vasik 2014-10-07 10:35:42 UTC
Karel said he is able to reproduce it within the beaker environment. Karel, is it possible to adjust some packages or you rely on the available repositories there?

Comment 6 Lukáš Nykrýn 2014-10-07 10:47:39 UTC
Or if it is not possible you can patch the initscripts directly in your test. https://git.fedorahosted.org/cgit/initscripts.git/diff/?id=23eb694a61d155a0b5ce4403e1e0d8dc70653e76

Comment 7 Lukáš Nykrýn 2014-10-07 10:49:08 UTC
(with small change: fedora-import-state -> rhel-import-state)

Comment 8 Karel Volný 2014-10-07 14:11:50 UTC
(In reply to Ondrej Vasik from comment #5)
> Karel said he is able to reproduce it within the beaker environment. Karel,
> is it possible to adjust some packages or you rely on the available
> repositories there?

machine installation relies on what's in repos, we do upgrades only post-install, so it depends on when the change happens? - reading further, I understand that it is on each boot

(In reply to Lukáš Nykrýn from comment #6)
> Or if it is not possible you can patch the initscripts directly in your
> test.
> https://git.fedorahosted.org/cgit/initscripts.git/diff/
> ?id=23eb694a61d155a0b5ce4403e1e0d8dc70653e76

okay, so I've patched the file and rebooted:

[0 root@auto-x86-64-001 ~]# diff /usr/lib/systemd/rhel-import-state~ /usr/lib/systemd/rhel-import-state
4,6d3
< # exit early if root isn't writeable
< [ -w / ] || exit 0
< 
9c6
< cp -a -t / .
---
> find . -mindepth 1 -maxdepth 1 -exec cp -av -t / {} \;
13c10
<     find . | ( cd /; restorecon -i -f -; ) || :
---
>     find . -mindepth 1 -print0 | { cd / && xargs --null restorecon -i; }
[0 root@auto-x86-64-001 ~]# ls -ld /
drwxr-xr-x. 24 root root 4096 22. kvě 04.56 /

obviously, it is not enough

so ... `chmod -w /` and reboot

cool, 
[0 root@auto-x86-64-001 ~]# ls -ld /
dr-xr-xr-x. 24 root root 4096  7. říj 09.51 /
[0 root@auto-x86-64-001 ~]# rpm -V filesystem
[0 root@auto-x86-64-001 ~]#

now let's verify that it gets changed again without the patch:

[0 root@auto-x86-64-001 ~]# mv /usr/lib/systemd/rhel-import-state~ /usr/lib/systemd/rhel-import-state
mv: přepsat „/usr/lib/systemd/rhel-import-state“? y

and reboot ... and the problem is back:

[0 root@auto-x86-64-001 ~]# ls -ld /
drwxr-xr-x. 24 root root 4096  7. říj 10.00 /
[0 root@auto-x86-64-001 ~]# rpm -V filesystem
.M.......    /


so, it looks like this patch really fixes the issue

Comment 9 Ondrej Vasik 2014-10-07 18:26:34 UTC
Ok, thanks, reassigning to initscripts.

Comment 15 errata-xmlrpc 2015-03-05 10:53:36 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://rhn.redhat.com/errata/RHBA-2015-0471.html