Linux chcon:不能应用部分(Fedora 22)


0

我尝试更改MYAPPdir的权限,因为它具有777权限,因为SEliux已阻止它

所以我输入这个命令

su -c "chcon -R -h -t httpd_sys_script_rw_t /usr/share/nginx/html/MYAPP/

但我得到这个错误

chcon: can't apply partial context to unlabeled file HtmlPhpSpecExceptionPresenter.php
chcon: can't apply partial context to unlabeled file Exception
chcon: can't apply partial context to unlabeled file StringPresenter.php
chcon: can't apply partial context to unlabeled file TaggingPresenter.php
chcon: can't apply partial context to unlabeled file Presenter.php
chcon: can't apply partial context to unlabeled file SimplePresenter.php
chcon: can't apply partial context to unlabeled file PresenterInterface.php
chcon: can't apply partial context to unlabeled file Presenter
chcon: can't apply partial context to unlabeled file FatalPresenter.php
chcon: can't apply partial context to unlabeled file HtmlFormatter.php
chcon: can't apply partial context to unlabeled file ReportFailedItem.php
chcon: can't apply partial context to unlabeled file ReportSkipped.html
chcon: can't apply partial context to unlabeled file ReportFooter.html
chcon: can't apply partial context to unlabeled file ReportPending.html

注意:这种情况发生remote server在我的local machine工作上

Answers:


1

使用semanage命令检查。

semanage fcontext -a -t httpd_sys_script_rw_t "/usr/share/nginx/html/MYAPP(/.*)?"

restorecon -R -v MYAPP

首先检查一些demo文件夹。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.