<p><span style="font-family:宋体; color:#454545"><span style="font-size:14px"></span></span></p>
<h1 class="artical-title" style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin:38px 0px 0px; padding:0px; font-size:28px; line-height:1.5; font-weight:normal; color:rgb(51,51,51)"> 查看 SELinux状态及关闭SELinux</h1>
<br>
<p></p>
<p><span style="font-family:宋体; color:#454545"><span style="font-size:14px">转载:http://blog.51cto.com/bguncle/957315</span></span></p>
<p><span style="font-family:宋体; color:#454545"><span style="font-size:14px"></span></span></p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 查看SELinux状态:</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 1、/usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> SELinux status: enabled</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 2、getenforce ##也可以用这个命令检查</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 关闭SELinux:</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 1、临时关闭(不用重启机器):</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> setenforce 0 ##设置SELinux 成为permissive模式</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> ##setenforce 1 设置SELinux 成为enforcing模式</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 2、修改配置文件需要重启机器:</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 修改/etc/selinux/config 文件</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 将SELINUX=enforcing改为SELINUX=disabled</p>
<p style="font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; max-width:100%; font-size:16px; color:rgb(51,51,51)"> 重启机器即可</p>
<br>
<p style="text-align:center"><span style="font-family:宋体; color:#454545"><strong style=""><span style="font-size:24px"><br> </span></strong></span></p>
<p style="text-align:center"><span style="font-family:宋体; color:#454545"><strong style=""><span style="font-size:24px">Android 5.x SEAndroid/SElinux内核节点的读写权限</span></strong><br> </span></p>
<p><span style="font-family:宋体; color:#454545"><span style="font-size:14px">转载自:http://blog.csdn.net/tung214/article/details/44461985</span></span></p>
<p><span style="margin:0px; padding:0px; color:rgb(69,69,69); font-family:宋体; font-size:14px"> Android 5.0下,因为采取了SEAndroid |
|