加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

selinux avc:否认问题

发布时间:2020-12-14 02:49:19 所属栏目:Linux 来源:网络整理
导读:我只是在许可模式下使用se linux设置了一个Web托管服务器,这意味着它是不安全的,但是会将问题写入消息日志文件.一旦我修复了所有avc:denied错误,我将把服务器置于’强制’模式.但这是问题所在.在/ var / log / messages中,我有以下错误: Apr 3 14:32:30 na
我只是在许可模式下使用se linux设置了一个Web托管服务器,这意味着它是不安全的,但是会将问题写入消息日志文件.一旦我修复了所有avc:denied错误,我将把服务器置于’强制’模式.但这是问题所在.在/ var / log / messages中,我有以下错误:
Apr  3 14:32:30 narf kernel: type=1400 audit(1365013105.731:3): avc:  denied  { search }      for  pid=1319 comm="vsftpd" name="/" dev=dm-2 ino=2 scontext=system_u:system_r:ftpd_t:s0-   s0:c0.c1023 tcontext=system_u:object_r:home_root_t:s0 tclass=dir

现在,我如何从逻辑上接近这一点,是否有人有任何交易提示?

解决方法

看起来您希望FTP能够用于普通用户(在/ home中有内容).

有一个布尔值来解决这个问题.你可以通过以下方式解决这个问题.

cat your_avc_txt.txt | audit2why

哪个产生:

Apr  3 14:32:30 narf kernel: type=1400 audit(1365013105.731:3): avc:  denied  { search } for  pid=1319 comm="vsftpd" name="/" dev=dm-2 ino=2 scontext=system_u:system_r:ftpd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:home_root_t:s0 tclass=dir

Was caused by:
One of the following booleans was set incorrectly.
Description:
Allow ftp to read and write files in the user home directories

Allow access by executing:
# setsebool -P ftp_home_dir 1
Description:
Allow ftp servers to login to local users and read/write all files on the system,governed by DAC.

Allow access by executing:
# setsebool -P ftpd_full_access 1

这告诉你哪些布尔值控制了这种行为以及他们做了什么,你应该启用布尔值,这是两者中最严格的.所以在你的情况下ftp_home_dir.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读