LinuxSir.cn,穿越时空的Linuxsir!

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

SELinux 阻止FTP访问,请教高手如何设置SELinux

[复制链接]
发表于 2007-6-27 00:33:57 | 显示全部楼层 |阅读模式
提示信息如下:
Summary
    SELinux is preventing /usr/sbin/vsftpd (ftpd_t) "execute" to unix_update
    (updpwd_exec_t).

Detailed Description
    SELinux denied access requested by /usr/sbin/vsftpd. It is not expected that
    this access is required by /usr/sbin/vsftpd and this access may signal an
    intrusion attempt. It is also possible that the specific version or
    configuration of the application is causing it to require additional access.

Allowing Access
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for unix_update, restorecon -v
    unix_update If this does not work, there is currently no automatic way to
    allow this access. Instead,  you can generate a local policy module to allow
    this access - see http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385
    Or you can disable SELinux protection altogether. Disabling SELinux
    protection is not recommended. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.

Additional Information        

Source Context                system_u:system_r:ftpd_t
Target Context                system_u: object_r:updpwd_exec_t
Target Objects                unix_update [ file ]
Affected RPM Packages         vsftpd-2.0.5-16.fc7 [application]
Policy RPM                    selinux-policy-2.6.4-14.fc7
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.catchall_file
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 2.6.21-1.3228.fc7 #1
                              SMP Tue Jun 12 15:37:31 EDT 2007 i686 i686
Alert Count                   3
First Seen                    Wed 27 Jun 2007 12:07:09 AM CST
Last Seen                     Wed 27 Jun 2007 12:39:03 AM CST
Local ID                      1f355ccc-d090-4b0e-b438-0f8234a13136
Line Numbers                  

Raw Audit Messages            

avc: denied { execute } for comm="vsftpd" dev=dm-0 egid=0 euid=0
exe="/usr/sbin/vsftpd" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="unix_update"
pid=4565 scontext=system_u:system_r:ftpd_t:s0 sgid=0
subj=system_u:system_r:ftpd_t:s0 suid=0 tclass=file
tcontext=system_u: object_r:updpwd_exec_t:s0 tty=(none) uid=0

如题,在线等候.
发表于 2007-6-27 01:43:21 | 显示全部楼层
不知道你会不会 selinux,我不会。如果你只是个人用,可以去掉 试试。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-27 07:12:40 | 显示全部楼层

我也想关闭SELinux,出于安全考虑,还是不想关。

关闭SELinux肯定能够达到目的,不过,如果能够不关闭,作适当的调整就可以达到目的的话,就是我需要的目标。
回复 支持 反对

使用道具 举报

发表于 2007-6-27 18:36:05 | 显示全部楼层
天,上面这么长``````````````
回复 支持 反对

使用道具 举报

发表于 2007-6-28 03:35:23 | 显示全部楼层
先找到unix_update
# locate unix_update

1. Output里面说了你可以先尝试恢复unix_update的default security context
# restorecon -v unix_update

2. 如果你确认unix_update可以安全地被vsftpd所运行地话,那么你可以把unix_update的type修改成ftpd_t (也就是vsftpd的type)
# chcon -t ftpd_t -R unix_update

3. 尝试安装setroubleshoot. 它是目前比较好的selinux问题帮助程序. 当然它需要有X window,安装以后可以运行 setroubleshootd. 以后碰到有selinux access deny的时候它会自动跳出对话框并建议相应的解决方法
回复 支持 反对

使用道具 举报

发表于 2007-6-28 11:11:57 | 显示全部楼层
.....................
回复 支持 反对

使用道具 举报

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

本版积分规则

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