Adding a SELinux context fails with "ValueError: File spec /path/ conflicts with equivalency rule '/another/path'

Solution Verified - Updated -

Issue

  • Attempting to add a selinux file context rule fails like seen below:
# semanage fcontext -a -t system_u:object_r:httpd_log_t:s0 "/data/logs/httpd(/.*)?"
ValueError: File spec /data/logs/httpd(/.*)? conflicts with equivalency rule '/data /home/webmaster'; Try adding '/home/webmaster/logs/httpd(/.*)?' instead

Environment

  • Red Hat Enterprise Linux 7.x

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