audit2allow 在设置 nginx 时询问路径

audit2allow 在设置 nginx 时询问路径

为了在 centos7 上设置 nginx,我曾经运行:

grep nginx /var/log/audit/audit.log | audit2allow -M nginxse

它工作得很好,但显然在更新的系统上,它是不同的。 Audit2allow 抱怨:

You must specify the -p option with the path to the policy file.

我怎样才能像以前一样使用它来解决安全策略问题?

答案1

显然,selinux 在这台新机器上被禁用,因此审核日志没有错误,这就是命令失败的原因。

答案2

您可以查看:https://www.linode.com/docs/quick-answers/linux/how-to-install-selinux-on-ubuntu-18-04/#install-selinux 安装selinux后还需要到这里下载python3-settools_4.1.1-3_amd64.deb并安装 https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/python3-setools_4.1.1-3_amd64.deb.html 当我在Ubuntu18.04上这样做时,我能够正常使用audit2allow工具。我的英文不好,这是我用翻译软件翻译的,抱歉。

相关内容