Unable to write the logs on NFS share after enabling the Selinux

Solution Verified - Updated -

Issue

  • Before enabling selinux, the logs were being written to a log file which is on nfs share. But after enabling selinux, the logs are not being written and throwing below error messages:

    Feb 08 07:59:58 testmachine rsyslogd[63903]: omfile: creating parent directories for file  'Permission denied' failed: /myshare/nfs-share1/sub-share [v8.24.0-57.el7_9.3]
    

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 10
  • Rsyslog
  • Selinux
  • NFS

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