Android 5.x SEAndroid/SElinux内核节点的读写权限

论坛 期权论坛     
选择匿名的用户   2021-6-2 16:29   594   0
<p><span style="font-family:宋体; color:#454545"><span style="font-size:14px"></span></span></p>
<h1 class="artical-title" style="font-family:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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&#61;enforcing改为SELINUX&#61;disabled</p>
<p style="font-family:&#34;Helvetica Neue&#34;,Helvetica,&#34;PingFang SC&#34;,&#34;Hiragino Sans GB&#34;,&#34;Microsoft YaHei&#34;,微软雅黑,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
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP