wesley tanaka

SELinux file_contexts: Multiple different specifications for . . .

‹ Food biofuels make more CO₂ than gasoline | page not found (404) for all pages in Drupal 6 ›
()

Was getting this error when installing/upgrading rpm software packages using yum, restarting mysql and various other tasks:

/etc/selinux/targeted/contexts/files/file_contexts: Multiple different specifications for /var/lib/awstats(/.*)? (system_u:object_r:httpd_sys_script_rw_t:s0 and system_u:object_r:awstats_var_lib_t:s0).
/etc/selinux/targeted/contexts/files/file_contexts: Multiple different specifications for /usr/share/awstats/wwwroot/cgi-bin(/.*)? (system_u:object_r:httpd_sys_script_exec_t:s0 and system_u:object_r:httpd_awstats_script_exec_t:s0).

I got rid of the error messages with:

sudo semanage fcontext -m '/var/lib/awstats(/.*)?'

sudo semanage fcontext -m '/usr/share/awstats/wwwroot/cgi-bin(/.*)?'

though I'm not sure if that's the "proper" fix/solution.

Suggested Links

Commands not working for me

I am seeing the same on a machine of mine (Fedora 8), but when running the semanage command, it complains about missing setype?

# semanage fcontext -m '/usr/share/awstats/wwwroot/cgi-bin(/.*)?'
/usr/sbin/semanage: Requires setype, serange or seuser

What am I doing wrong?

Syndicate content