Ask Your Question

Fedora26_private-cloud: Cannot repair SElinux labels on custom network config files

asked 2017-08-06 14:51:49 -0500

updated 2018-11-04 04:16:30 -0500

hhlp gravatar image

I am building an Image for private openstack cloud in ansible, after I drop network config files in /etc/sysctl.d/ , I am telling ansible to repair the SElinux labels on those files by using 'setfiles /etc/selinux....context files, I seems that this command does not work through ansible... However if I type this command manually on the Fedora26 it seems to be working...

edit retag flag offensive close merge delete


How are you applying those labels? Are you using sefcontext Ansible module?

masteroman gravatar imagemasteroman ( 2017-08-06 17:04:58 -0500 )edit

No, I am using "setfiles /etc/selinux/targeted/contexts/files/file_contexts /"

a.wadekar gravatar imagea.wadekar ( 2017-08-06 17:23:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-07 08:27:26 -0500

setfiles -m <path name> resets those labels.

edit flag offensive delete link more

Question Tools


Asked: 2017-08-06 14:51:49 -0500

Seen: 79 times

Last updated: Aug 06 '17