SELinux preventing service from starting when symlink points to systemd unit file in NFS

Solution Verified - Updated -

Issue

  • User is using NFS for storing application binaries and files.
  • A symlink /etc/systemd/system/customsystemd.service points to a systemd unit file in NFS.

  • Checking if service is enabled fails:

    [root@rhel9:~]# systemctl is-enabled customsystemd.service
    Failed to get unit file state for customsystemd.service: Access denied
    
  • Checking service status fails:

    [root@rhel9:~]# systemctl status customsystemd.service
    Unit customsystemd.service could not be found.
    
  • Starting the service fails:

    [root@rhel9:~]# systemctl start customsystemd.service
    Failed to start customsystemd.service: Unit customsystemd.service not found.
    

Environment

  • Red Hat Enterprise Linux (RHEL) 9.5
  • NFS Server v4.1
  • SELinux in Enforcing mode

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