zoukankan      html  css  js  c++  java
  • selinux

    man semanage-fcontext

    除了fcontext

    还有端口也要开通,比如

    semanage port -a -t http_port_t -p tcp 8309

    方法1:chcon -R -t httpd_sys_rw_content_t /var/www/qin/

    方法2:chcon --reference=/etc /local  -R

    方法3(推荐,写到系统内核):

    EXAMPLE
           remember to run restorecon after you set the file context
           Add file-context for everything under /web
           # semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
           # restorecon -R -v /web

           Substitute /home1 with /home when setting file context
           # semanage fcontext -a -e /home /home1
           # restorecon -R -v /home1

           For home directories under top level directory, for example /disk6/home,
           execute the following commands.
           # semanage fcontext -a -t home_root_t "/disk6"
           # semanage fcontext -a -e /home /disk6/home
           # restorecon -R -v /disk6

    布尔值

     getsebool -a

    setsebool samba_export_all_rw on  #临时打开

    setsebool -P samba_export_all_rw on  #永久打开

    两个selinux排查方法(参考,无法百分百准确)

    sealert -b

    audit2allow  < /var/log/audit/audit.log

  • 相关阅读:
    js前端分享功能
    git常用命令
    webstorm中.vue报错
    页面重绘重排
    浏览器渲染引擎总结
    javascript中的this总结
    cookie、session、sessionid 与jsessionid
    promise和Angular中的 $q, defer
    C++11之nullptr
    C++ 输入ctrl+z 不能再使用cin的问题
  • 原文地址:https://www.cnblogs.com/smlie/p/11386445.html
Copyright © 2011-2022 走看看