SELinux confined users unable to check status of masked services

Solution Verified - Updated -

Issue

When checking on that status of a masked service as a sysadm_u SELinux user, the command fails with "Failed to get properties: Access denied."

  • As unconfined user :

    # id -Z
    unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    
    # systemctl status dummy
    ● dummy.service
       Loaded: masked (/dev/null; bad)
       Active: inactive (dead)
    
  • As confined user:

    $ id -Z
    sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023
    
    $ systemctl status dummy
    Failed to get properties: Access denied
    

Environment

Red Hat Enterprise Linux 7.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content