chcon: não é possível aplicar contexto parcial ao arquivo sem rótulo enquanto instala o nagios com o SELinux


9

Estou configurando o núcleo do Nagios no CentOS com SELINUX = reforçando.

Eu tento correr

chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/

conforme sugerido no manual , mas recebo estas mensagens de erro:

chcon: can't apply partial context to unlabeled file `cmd.cgi'
chcon: can't apply partial context to unlabeled file `trends.cgi'
chcon: can't apply partial context to unlabeled file `histogram.cgi'
chcon: can't apply partial context to unlabeled file `avail.cgi'
chcon: can't apply partial context to unlabeled file `history.cgi'
chcon: can't apply partial context to unlabeled file `status.cgi'
chcon: can't apply partial context to unlabeled file `tac.cgi'
chcon: can't apply partial context to unlabeled file `showlog.cgi'
chcon: can't apply partial context to unlabeled file `notifications.cgi'
chcon: can't apply partial context to unlabeled file `extinfo.cgi'
chcon: can't apply partial context to unlabeled file `statuswml.cgi'
chcon: can't apply partial context to unlabeled file `outages.cgi'
chcon: can't apply partial context to unlabeled file `statuswrl.cgi'
chcon: can't apply partial context to unlabeled file `statusmap.cgi'
chcon: can't apply partial context to unlabeled file `config.cgi'
chcon: can't apply partial context to unlabeled file `summary.cgi'

Alguma idéia de como evitar esses erros?


11
Rotular os arquivos? ou seja, adicione um rótulo de usuário e função, além do rótulo de tipo.
Ninjalj 29/10

Respostas:


5

Você precisa rotular novamente os arquivos com o tipo certo de selinux:

semanage fcontext -a -s system_u -t httpd_sys_script_exec_t /usr/local/nagios/sbin/*
Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.