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.
Description of problem:
Selinux blocks systemd from mounting a volume under /home with a mount.mount unit.
Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-41.el8_2.8.noarch
selinux-policy-targeted-3.14.3-41.el8_2.8.noarch
systemd-239-31.el8_2.2.x86_64
How reproducible:
100%
Steps to Reproduce:
1. See Addition Info
Actual results:
Fail
Expected results:
Be able to mount filesystems anywhere on a host with systemd.
Additional info:
----------------
Systemd mount units
----------------
# /etc/systemd/system/var-home-share1.mount
[Unit]
Description=Mount Share1
[Mount]
What=nfs.redhat.com:/nfsexport/share1
Where=/var/home/share1
Type=nfs
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/var-home-share1.automount
[Unit]
Description=Automount Share1
[Automount]
Where=/var/home/share1
DirectoryMode=0755
[Install]
WantedBy=multi-user.target
----------------
Audit Log
----------------
# echo 'type=AVC msg=audit(1609446667.955:138): avc: denied { create } for pid=1 comm="systemd" name="share1" scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=dir permissive=0' | audit2allow
#============= init_t ==============
allow init_t user_home_dir_t:dir create;
----------------
Error
----------------
● var-home-share1.automount - Automount Share1
Loaded: loaded (/etc/systemd/system/var-home-share1.automount; enabled; vendor preset: disabled)
Active: failed (Result: resources) since Thu 2020-12-31 20:30:40 UTC; 37min ago
Where: /var/home/share1
systemd[1]: Set up automount Automount Share1.
systemd[1]: var-home-share1.automount: Failed to check directory /var/home/share1: No such file or directory
systemd[1]: var-home-share1.automount: Failed to initialize automounter: No such file or directory
systemd[1]: var-home-share1.automount: Failed with result 'resources'.
systemd[1]: Failed to set up automount Automount Share1.
----------------
Description of problem: Selinux blocks systemd from mounting a volume under /home with a mount.mount unit. Version-Release number of selected component (if applicable): selinux-policy-3.14.3-41.el8_2.8.noarch selinux-policy-targeted-3.14.3-41.el8_2.8.noarch systemd-239-31.el8_2.2.x86_64 How reproducible: 100% Steps to Reproduce: 1. See Addition Info Actual results: Fail Expected results: Be able to mount filesystems anywhere on a host with systemd. Additional info: ---------------- Systemd mount units ---------------- # /etc/systemd/system/var-home-share1.mount [Unit] Description=Mount Share1 [Mount] What=nfs.redhat.com:/nfsexport/share1 Where=/var/home/share1 Type=nfs [Install] WantedBy=multi-user.target # /etc/systemd/system/var-home-share1.automount [Unit] Description=Automount Share1 [Automount] Where=/var/home/share1 DirectoryMode=0755 [Install] WantedBy=multi-user.target ---------------- Audit Log ---------------- # echo 'type=AVC msg=audit(1609446667.955:138): avc: denied { create } for pid=1 comm="systemd" name="share1" scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=dir permissive=0' | audit2allow #============= init_t ============== allow init_t user_home_dir_t:dir create; ---------------- Error ---------------- ● var-home-share1.automount - Automount Share1 Loaded: loaded (/etc/systemd/system/var-home-share1.automount; enabled; vendor preset: disabled) Active: failed (Result: resources) since Thu 2020-12-31 20:30:40 UTC; 37min ago Where: /var/home/share1 systemd[1]: Set up automount Automount Share1. systemd[1]: var-home-share1.automount: Failed to check directory /var/home/share1: No such file or directory systemd[1]: var-home-share1.automount: Failed to initialize automounter: No such file or directory systemd[1]: var-home-share1.automount: Failed with result 'resources'. systemd[1]: Failed to set up automount Automount Share1. ----------------