我只是设置一个虚拟主机服务器与selinux在宽容模式,这意味着它是不安全的,但写入问题的消息日志文件。 一旦我修复了所有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 。
下面的这个命令是用户最友好的。 我只是审计,为什么整个audit.log。
/usr/bin/audit2why < /var/log/audit/audit.log