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

Solution Unverified - 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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.