Linux chcon:无法应用部分(Fedora 22)

Linux chcon:无法应用部分(Fedora 22)

我尝试更改MYAPP目录的权限,因为它有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工作很好

答案1

使用 semanage 命令检查。

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

restorecon -R -v MYAPP

首先检查一些演示文件夹。

相关内容