LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 862|回复: 6

SELinux如何设置啊??新手,请老鸟指导。

[复制链接]
发表于 2008-4-9 09:03:17 | 显示全部楼层 |阅读模式
摘要
    SELinux 正在阻止 [color="Red"]X(xdm_xserver_t) "write"  <未知>。 阅读 audit.log
    完整了解 SELinux 的消息。

详细的描述
    SELinux is preventing X (xdm_xserver_t) "write" to <未知> (etc_t). The
    SELinux type etc_t, is a generic type for all files in the directory and
    very few processes (SELinux Domains) are allowed to write to this SELinux
    type.  This type of denial usual indicates a mislabeled file.  By default a
    file created in a directory has the gets the context of the parent
    directory, but SELinux policy has rules about the creation of directories,
    that say if a process running in one SELinux Domain (D1) creates a file in a
    directory with a particular SELinux File Context (F1) the file gets a
    different File Context (F2).  The policy usually allows the SELinux Domain
    (D1) the ability to write or append on (F2).  But if for some reason a file
    (<未知>) was created with the wrong context, this domain will be denied.
    The usual solution to this problem is to reset the file context on the
    target file, restorecon -v <未知>.  If the file context does not change
    from etc_t, then this is probably a bug in policy.  Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against the selinux-policy
    package. If it does change, you can try your application again to see if it
    works.  The file context could have been mislabeled by editing the file or
    moving the file from a different directory, if the file keeps getting
    mislabeled, check the init scripts to see if they are doing something to
    mislabel the file.

<b>正在允许访问</b>
    您可以运行 restorecon -v <未知>  来更改文件上下文。

[color="Red"]    以下命令将允许这个权限:
    restorecon <未知>

附加的信息               

源上下文                  system_u:system_r:xdm_xserver_t:s0-s0:c0.c1023
目标上下文               system_ubject_r:etc_t:s0
目标对象                  None [ file ]
受影响的 RPM 包         
策略 RPM                    selinux-policy-3.0.8-44.fc8
Selinux 激活                True
策略类型                  targeted
MLS 激活                    True
强制模式                  Enforcing
插件名称                  plugins.mislabeled_file
主机名                     Backy
平台                        Linux Backy 2.6.24.4-64.fc8 #1 SMP Sat Mar 29
                              09:54:46 EDT 2008 i686 athlon
警告记数                  38
First Seen                    2008年04月08日 星期二 20时02分36秒
Last Seen                     2008年04月09日 星期三 08时20分55秒
Local ID                      36b48eed-b722-4dcf-8e1e-b9b18818aaec
行数                        

原始 Audit 消息           

avc: denied { write } for comm=X dev=dm-0 name=amdpcsdb pid=2479
scontext=system_u:system_r:xdm_xserver_t:s0-s0:c0.c1023 tclass=file
tcontext=system_ubject_r:etc_t:s0


我想知道他给我阻止的是哪个文件?我如何去掉他的这个阻止。。这个提示我实在看不明白。
发表于 2008-4-9 09:12:12 | 显示全部楼层
不如关掉算了
回复 支持 反对

使用道具 举报

发表于 2008-4-9 16:23:36 | 显示全部楼层
不用管。阻止是好事。解除阻止倒会产生问题了。一般在普通用户下是不会报警的。你是不是在超级用户下操作了?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-9 16:31:11 | 显示全部楼层
Post by jsw7001;1836268
不如关掉算了


谢谢兄弟建议,我是想搞一下这个东西,才弄的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-9 16:32:45 | 显示全部楼层
Post by Summerserenity;1836427
不用管。阻止是好事。解除阻止倒会产生问题了。一般在普通用户下是不会报警的。你是不是在超级用户下操作了?


我在普通用户和超级用户都有这种提示。所以想知道怎么解决。。。。

按道理应该不会太麻烦吧?因为如果太麻烦了就失去了他的可用性了阿。
回复 支持 反对

使用道具 举报

发表于 2008-4-9 22:12:41 | 显示全部楼层
第一遇到就觉得麻烦,直接给关了。
以后还得时不时想着,要把它关了。
回复 支持 反对

使用道具 举报

发表于 2008-4-10 09:50:22 | 显示全部楼层
我也不懂,直接禁用鸟,呵呵。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表