首页 文章

启用selinux时无法从Web浏览器访问nfs文件

提问于
浏览
0

当selinux被禁用时,我可以从我的amazon ec2 centos实例上的nfs挂载卷访问html页面 . 但是当我启用它时,我得到“无法连接”错误 . 我已启用httpd_use_nfs和其他相关的布尔策略,但仍然得到相同的错误 . 请帮我解决问题 . 我需要apache才能使用SELinux On访问我的网页 .

1 回答

  • 0

    如何检查selinux是否产生问题:

    setenforce 0 # if it works after this command : Selinux is the problem
    setenforce 1 # re-enable selinux because you are not crazy
    

    如何解决selinux的问题:

    # install setroubleshoot (here for centos7)
    yum install setroubleshoot
    #audit
    tail -f /var/log/messages | grep sealert
    

    阅读最后一条消息,您可以执行建议的命令来解决您的问题 .

    通常,之后,问题得到解决 .

    SeLinux很简单......有时...... ;-)

相关问题