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 1405188 - /dev/shm is created with 755 permissions instead of 777 when the dracut fcoe module is included
Summary: /dev/shm is created with 755 permissions instead of 777 when the dracut fcoe ...
Keywords:
Status: CLOSED DUPLICATE of bug 1406254
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-15 20:18 UTC by Kyle Walker
Modified: 2020-09-10 10:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-02 14:33:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to correct the permissions (519 bytes, patch)
2016-12-15 20:24 UTC, Kyle Walker
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2759321 0 None None None 2016-12-15 20:40:54 UTC

Description Kyle Walker 2016-12-15 20:18:27 UTC
Description of problem:
 The following BZ results in the /dev/shm filesystem being mounted with the incorrect 755 permissions:

	https://bugzilla.redhat.com/show_bug.cgi?id=1246217

This has been noted in multiple different Fedora bug reports.

Version-Release number of selected component (if applicable):

	dracut-network-033-463.el7.x86_64

How reproducible:

	Easily

Steps to Reproduce:
1. yum install fcoe-utils lldpad
2. dracut -f -v -a fcoe
3. reboot and verify /dev/shm permissions

Actual results:

	# ls -ld /dev/shm
	drwxr-xr-t. 2 root root 60 Dec 15 15:09 /dev/shm


Expected results:

	$ ls -ld /dev/shm
	drwxrwxrwt. 2 root root 260 Dec 15 15:16 /dev/shm


Additional info:

Comment 1 Kyle Walker 2016-12-15 20:24:19 UTC
Created attachment 1232319 [details]
Patch to correct the permissions

The underlying issue is due to:

/usr/lib/dracut/modules.d/95fcoe/cleanup-fcoe.sh
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

if [ -e /var/run/lldpad.pid ]; then
    lldpad -k
    mkdir -m 0755 -p /run/initramfs/state/dev/shm
    cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
    echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
fi


The above /run/initramfs/state/dev/shm persists across the switchroot as the /dev/shm interface. By issuing the mkdir above as 777, the correct permissions are observed following boot.

Comment 2 Lukáš Nykrýn 2017-01-02 14:33:10 UTC

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

Comment 3 Lukáš Nykrýn 2017-01-02 14:39:07 UTC
That patch is not correct, it will leave a writable directory in /run which could be a security risk. In fedora we now have a fix in initscripts that we don't modify the directory permissions if the directory exists.


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