
為了在 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工具。我的英文不好,這是我用翻譯軟體翻譯的,抱歉。