chcon: không thể áp dụng bối cảnh một phần cho tệp chưa được gắn nhãn trong khi cài đặt nagios với SELinux


9

Tôi đang thiết lập lõi Nagios trên CentOS với SELINUX = thực thi.

Tôi cố gắng chạy

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

như được đề xuất trong hướng dẫn , nhưng tôi nhận được thông báo lỗi này:

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'

Bất kỳ ý tưởng làm thế nào để tránh những lỗi này?


1
Dán nhãn các tập tin? tức là thêm nhãn người dùng và vai trò, ngoài nhãn loại.
— ninjalj

Câu trả lời:


5

Bạn cần phải dán lại các tệp với loại selinux phù hợp:

semanage fcontext -a -s system_u -t httpd_sys_script_exec_t /usr/local/nagios/sbin/*
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookie và Chính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.